mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
gh-97850: Remove all known instances of module_repr() (#97876)
Remove all known instances of module_repr()
This commit is contained in:
parent
815008a3a5
commit
5dc3599135
6 changed files with 7 additions and 35 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue