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

Function install_tests

Lib/test/test_xml_etree_c.py:260–270  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

258
259
260def install_tests():
261 # Test classes should have __module__ referring to this module.
262 from test import test_xml_etree
263 for name, base in vars(test_xml_etree).items():
264 if isinstance(base, type) and issubclass(base, unittest.TestCase):
265 class Temp(base):
266 pass
267 Temp.__name__ = Temp.__qualname__ = name
268 Temp.__module__ = __name__
269 assert name not in globals()
270 globals()[name] = Temp
271
272install_tests()
273

Callers 1

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…