gh-97850: Remove all known instances of module_repr() by warsaw · Pull Request #97876 · python/cpython
def test_module_repr_indirect(self): def test_module_repr_indirect_through_spec(self): name = '__hello__' module, output = self.exec_module(name) self.assertEqual(repr(module),
def test_module_repr(self): with fresh('__hello__', oldapi=True): module = self.machinery.FrozenImporter.load_module('__hello__') repr_str = self.machinery.FrozenImporter.module_repr(module) self.assertEqual(repr_str, "<module '__hello__' (frozen)>")
# No way to trigger an error in a frozen module. test_state_after_failure = None