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

Method test_module

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

Source from the content-addressed store, hash-verified

710 print("cached_path_len =", cached_path_len)
711
712 def test_module(self):
713 self.maxDiff = None
714 self._check_path_limitations(self.pkgname)
715 create_empty_file(os.path.join(self.subpkgname, self.pkgname + '.py'))
716 importlib.invalidate_caches()
717 from areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation import areallylongpackageandmodulenametotestreprtruncation
718 module = areallylongpackageandmodulenametotestreprtruncation
719 self.assertEqual(repr(module), "<module %r from %r>" % (module.__name__, module.__file__))
720 self.assertEqual(repr(sys), "<module 'sys' (built-in)>")
721
722 def test_type(self):
723 self._check_path_limitations('foo')

Callers

nothing calls this directly

Calls 5

create_empty_fileFunction · 0.90
joinMethod · 0.45
invalidate_cachesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected