-
Notifications
You must be signed in to change notification settings - Fork 346
Closed
Description
I have a large project where the serialize_db_to_string
function from Django takes around 5s on every call to pytest
. This DB has some pre-loaded fixtures so it doesn't start the test run empty.
The relevant Django code is:
This is called from pytest-django django_db_setup
session fixture:
pytest-django/pytest_django/fixtures.py
Lines 144 to 148 in b732869
db_cfg = setup_databases( | |
verbosity=request.config.option.verbose, | |
interactive=False, | |
**setup_databases_args, | |
) |
We don't pass any of the serialize
parameters so it defaults to serializing.
The Django DiscoverRunner
doesn't always serialize:
It only serializes if there are any tests in the suite which use serialized_rollback
:
We should try to do the same if possible.
kingbuzzman and utapyngo
Metadata
Metadata
Assignees
Labels
No labels