Skip to content

Do common db setup between tests once #105

Closed
@alvinchow86

Description

@alvinchow86

It would be useful if I could do some common database setup that's shared between tests (like loading some large fixture data or something), just once for the test run rather than for every test, for faster performance. The test would still be wrapped in a transaction, so any db changes in tests would be rolled back to the original state.

However this doesn't seem possible in pytest_django, since the db fixture is only function scoped, whereas I might want to do this database setup on a module or session scope.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions