mirror of
https://github.com/python/cpython.git
synced 2025-09-09 02:11:51 +00:00
bpo-42136: Deprecate module_repr() as found in importlib (GH-25022)
This commit is contained in:
parent
21a2cabb37
commit
1899087b21
11 changed files with 1545 additions and 1478 deletions
|
@ -220,8 +220,10 @@ class LoaderDefaultsTests(ABCTestHarness):
|
|||
|
||||
def test_module_repr(self):
|
||||
mod = types.ModuleType('blah')
|
||||
with self.assertRaises(NotImplementedError):
|
||||
self.ins.module_repr(mod)
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore")
|
||||
with self.assertRaises(NotImplementedError):
|
||||
self.ins.module_repr(mod)
|
||||
original_repr = repr(mod)
|
||||
mod.__loader__ = self.ins
|
||||
# Should still return a proper repr.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue