MCPcopy
hub / github.com/django/django / test_shuffle_tests

Method test_shuffle_tests

tests/test_runner/tests.py:162–176  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

160 return list(iter_test_cases(suite))
161
162 def test_shuffle_tests(self):
163 tests = self.make_tests()
164 # Choose a seed that shuffles both the classes and methods.
165 shuffler = Shuffler(seed=9)
166 shuffled_tests = shuffle_tests(tests, shuffler)
167 self.assertIsInstance(shuffled_tests, collections.abc.Iterator)
168 self.assertTestNames(
169 shuffled_tests,
170 expected=[
171 "Tests2.test1",
172 "Tests2.test2",
173 "Tests1.test2",
174 "Tests1.test1",
175 ],
176 )
177
178 def test_reorder_test_bin_no_arguments(self):
179 tests = self.make_tests()

Callers

nothing calls this directly

Calls 4

make_testsMethod · 0.95
assertTestNamesMethod · 0.95
ShufflerClass · 0.90
shuffle_testsFunction · 0.90

Tested by

no test coverage detected