Skip to content

Commit 03e9187

Browse files
committed
Fixed #35402 -- Fixed (naively) django_test_skips crash when referencing a class
1 parent 48d20d0 commit 03e9187

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

django/db/backends/base/creation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ def mark_expected_failures_and_skips(self):
350350
test_app = test_name.split(".")[0]
351351
# Importing a test app that isn't installed raises RuntimeError.
352352
if test_app in settings.INSTALLED_APPS:
353+
# If this is a a test class, it may need to be imported.
354+
if test_name.count(".") == 2:
355+
import_string(test_name)
353356
test_case = import_string(test_case_name)
354357
test_method = getattr(test_case, test_method_name)
355358
setattr(test_case, test_method_name, skip(reason)(test_method))

0 commit comments

Comments
 (0)