MCPcopy Index your code
hub / github.com/python/cpython / load_tests

Function load_tests

Lib/test/test_enum.py:28–45  ·  view source on GitHub ↗
(loader, tests, ignore)

Source from the content-addressed store, hash-verified

26python_version = sys.version_info[:2]
27
28def load_tests(loader, tests, ignore):
29 tests.addTests(doctest.DocTestSuite(enum))
30
31 lib_tests = os.path.join(REPO_ROOT, 'Doc/library/enum.rst')
32 if os.path.exists(lib_tests):
33 tests.addTests(doctest.DocFileSuite(
34 lib_tests,
35 module_relative=False,
36 optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE,
37 ))
38 howto_tests = os.path.join(REPO_ROOT, 'Doc/howto/enum.rst')
39 if os.path.exists(howto_tests) and sys.float_repr_style == 'short':
40 tests.addTests(doctest.DocFileSuite(
41 howto_tests,
42 module_relative=False,
43 optionflags=doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE,
44 ))
45 return tests
46
47def reraise_if_not_enum(*enum_types_or_exceptions):
48 from functools import wraps

Callers

nothing calls this directly

Calls 3

addTestsMethod · 0.80
joinMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…