MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_class

Method test_class

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

write_fileFunction · 0.85
reprFunction · 0.85
joinMethod · 0.45
invalidate_cachesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected