We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
--keepdb
1 parent f13852a commit 93fca47Copy full SHA for 93fca47
pytest_django/fixtures.py
@@ -44,14 +44,14 @@ def _django_db_setup(request,
44
_disable_native_migrations()
45
46
db_args = {}
47
- if (request.config.getvalue('reuse_db') and
48
- not request.config.getvalue('create_db')):
49
- if get_django_version() >= (1, 8):
50
- db_args['keepdb'] = True
51
- else:
52
- monkey_patch_creation_for_db_reuse()
53
-
54
with _django_cursor_wrapper:
+ if (request.config.getvalue('reuse_db') and
+ not request.config.getvalue('create_db')):
+ if get_django_version() >= (1, 8):
+ db_args['keepdb'] = True
+ else:
+ monkey_patch_creation_for_db_reuse()
+
55
# Create the database
56
db_cfg = setup_databases(verbosity=pytest.config.option.verbose,
57
interactive=False, **db_args)
0 commit comments