Skip to content

Conversation

m000
Copy link

@m000 m000 commented Nov 8, 2024

Allow the convenience of db fixture for all fixture scopes.

The db fixture is very convenient when writing fixtures that create objects. However, for non function-scoped fixtures using db is not possible. This PR adds db_<scope> fixtures that can be used to the same effect as db when creating fixtures that use other scopes.

@m000 m000 force-pushed the scoped-db-fixtures branch from 91f7e29 to f686b1b Compare November 8, 2024 14:15
Allow the convenience of `db` fixture for all fixture scopes.
@m000 m000 force-pushed the scoped-db-fixtures branch from f686b1b to 92c0caa Compare November 8, 2024 14:28
@m000 m000 closed this Nov 8, 2024
@m000
Copy link
Author

m000 commented Nov 8, 2024

NVM. For anyone attempting the same thing, this has side-effects: by enabling database access from a wider scope, (of course) ALL tests in that scope will be allowed database access.

@m000 m000 deleted the scoped-db-fixtures branch November 8, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant