Skip to content

Commit 82de481

Browse files
authored
Use request.config instead of pytest.config (#677)
Will be deprecated in pytest 4.1. Ref: pytest-dev/pytest@b88c3f8f828
1 parent a3dc56d commit 82de481

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytest_django/fixtures.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ def django_db_setup(
103103

104104
with django_db_blocker.unblock():
105105
db_cfg = setup_databases(
106-
verbosity=pytest.config.option.verbose,
106+
verbosity=request.config.option.verbose,
107107
interactive=False,
108108
**setup_databases_args
109109
)
110110

111111
def teardown_database():
112112
with django_db_blocker.unblock():
113-
teardown_databases(db_cfg, verbosity=pytest.config.option.verbose)
113+
teardown_databases(db_cfg, verbosity=request.config.option.verbose)
114114

115115
if not django_db_keepdb:
116116
request.addfinalizer(teardown_database)

0 commit comments

Comments
 (0)