diff --git a/django/test/testcases.py b/django/test/testcases.py
a
|
b
|
|
282 | 282 | set up. This means that user-defined Test Cases aren't required to |
283 | 283 | include a call to super().setUp(). |
284 | 284 | """ |
| 285 | testMethod = getattr(self, self._testMethodName) |
| 286 | if (getattr(self.__class__, "__unittest_skip__", False) or |
| 287 | getattr(testMethod, "__unittest_skip__", False)): |
| 288 | return |
| 289 | |
285 | 290 | self.client = self.client_class() |
286 | 291 | try: |
287 | 292 | self._pre_setup() |
diff --git a/tests/regressiontests/test_utils/fixtures/should_not_be_loaded.json b/tests/regressiontests/test_utils/fixtures/should_not_be_loaded.json
new file mode 100644
-
|
+
|
|
| 1 | [ |
| 2 | { |
| 3 | "pk": 1, |
| 4 | "model": "test_utils.person", |
| 5 | "fields": { |
| 6 | "name": "Elvis Presley" |
| 7 | } |
| 8 | } |
| 9 | ] |
| 10 | |
diff --git a/tests/regressiontests/test_utils/tests.py b/tests/regressiontests/test_utils/tests.py
a
|
b
|
|
3 | 3 | import sys |
4 | 4 | |
5 | 5 | from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature |
| 6 | from django.utils.unittest import skip |
6 | 7 | |
7 | 8 | from models import Person |
8 | 9 | |
… |
… |
|
115 | 116 | # Remove the filter we just added. |
116 | 117 | self.restore_warnings_state() |
117 | 118 | |
| 119 | |
| 120 | class SkippingExtraTests(TestCase): |
| 121 | fixtures = ['should_not_be_loaded.json'] |
| 122 | |
| 123 | # HACK: This depends on internals of our TestCase subclasses |
| 124 | def __call__(self, result=None): |
| 125 | # Detect fixture loading by counting SQL queries, should be zero |
| 126 | with self.assertNumQueries(0): |
| 127 | super(SkippingExtraTests, self).__call__(result) |
| 128 | |
| 129 | @skip("Fixture loading should not be performed for skipped tests.") |
| 130 | def test_fixtures_are_skipped(self): |
| 131 | pass |
| 132 | |
| 133 | |
118 | 134 | __test__ = {"API_TEST": r""" |
119 | 135 | # Some checks of the doctest output normalizer. |
120 | 136 | # Standard doctests do fairly |