MCPcopy
hub / github.com/django/django / assertTestNames

Method assertTestNames

tests/test_runner/tests.py:90–95  ·  view source on GitHub ↗
(self, tests, expected)

Source from the content-addressed store, hash-verified

88 )
89
90 def assertTestNames(self, tests, expected):
91 # Each test.id() has a form like the following:
92 # "test_runner.tests.IterTestCasesTests.test_iter_test_cases.<locals>.Tests1.test1".
93 # It suffices to check only the last two parts.
94 names = [".".join(test.id().split(".")[-2:]) for test in tests]
95 self.assertEqual(names, expected)
96
97 def test_iter_test_cases_basic(self):
98 suite = self.make_test_suite()

Calls 2

joinMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected