gh-97850: Remove all known instances of module_repr() (#97876)

Remove all known instances of module_repr()
This commit is contained in:
Barry Warsaw 2022-10-05 11:42:26 -07:00 committed by GitHub
parent 815008a3a5
commit 5dc3599135
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7 additions and 35 deletions

View file

@ -239,7 +239,6 @@ a = A(destroyed)"""
repr(m), "<module 'foo' (<class 'test.test_module.FullLoader'>)>")
def test_module_repr_with_bare_loader_and_filename(self):
# Because the loader has no module_repr(), use the file name.
m = ModuleType('foo')
# Yes, a class not an instance.
m.__loader__ = BareLoader
@ -247,7 +246,6 @@ a = A(destroyed)"""
self.assertEqual(repr(m), "<module 'foo' from '/tmp/foo.py'>")
def test_module_repr_with_full_loader_and_filename(self):
# Even though the module has an __file__, use __loader__.module_repr()
m = ModuleType('foo')
# Yes, a class not an instance.
m.__loader__ = FullLoader