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

Method test_class

Lib/test/test_reprlib.py:740–749  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

738 pass
739
740 def test_class(self):
741 self._check_path_limitations('bar')
742 write_file(os.path.join(self.subpkgname, 'bar.py'), '''\
743class bar:
744 pass
745''')
746 importlib.invalidate_caches()
747 from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import bar
748 # Module name may be prefixed with "test.", depending on how run.
749 self.assertEqual(repr(bar.bar), "<class '%s.bar'>" % bar.__name__)
750
751 def test_instance(self):
752 self._check_path_limitations('baz')

Callers

nothing calls this directly

Calls 5

write_fileFunction · 0.70
joinMethod · 0.45
invalidate_cachesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected