mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
bpo-43672: raise ImportWarning when calling find_loader() (GH-25119)
This commit is contained in:
parent
ad442a674c
commit
f97dc80068
13 changed files with 610 additions and 616 deletions
|
|
@ -221,13 +221,13 @@ class LoaderDefaultsTests(ABCTestHarness):
|
|||
def test_module_repr(self):
|
||||
mod = types.ModuleType('blah')
|
||||
with warnings.catch_warnings():
|
||||
warnings.simplefilter("ignore")
|
||||
warnings.simplefilter("ignore", DeprecationWarning)
|
||||
with self.assertRaises(NotImplementedError):
|
||||
self.ins.module_repr(mod)
|
||||
original_repr = repr(mod)
|
||||
mod.__loader__ = self.ins
|
||||
# Should still return a proper repr.
|
||||
self.assertTrue(repr(mod))
|
||||
original_repr = repr(mod)
|
||||
mod.__loader__ = self.ins
|
||||
# Should still return a proper repr.
|
||||
self.assertTrue(repr(mod))
|
||||
|
||||
|
||||
(Frozen_LDefaultTests,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue