Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bluetech committed Sep 2, 2024
1 parent 7ade62a commit a9bb0c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pytest_django/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ def non_debugging_runtest(self) -> None:
try:
TestCaseFunction.runtest = non_debugging_runtest # type: ignore[method-assign]

# Don't set up the DB if the unittest does not require DB.
# The `databases` propery seems like the best indicator for that.
if request.cls.databases:
request.getfixturevalue("django_db_setup")
db_unblock = django_db_blocker.unblock()
Expand Down

0 comments on commit a9bb0c7

Please sign in to comment.