mirror of https://github.com/python/cpython.git
[3.13] gh-121279: Fix importlib DeprecatedAttrsTests (#121319)
Delete attributes after getting them, so the warning is emitted again when the test is run multiple times (ex: when checking for reference leaks).
This commit is contained in:
parent
251667340e
commit
ec0f801a72
|
@ -920,14 +920,17 @@ class DeprecatedAttrsTests:
|
|||
def test_deprecated_attr_ResourceReader(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
self.abc.ResourceReader
|
||||
del self.abc.ResourceReader
|
||||
|
||||
def test_deprecated_attr_Traversable(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
self.abc.Traversable
|
||||
del self.abc.Traversable
|
||||
|
||||
def test_deprecated_attr_TraversableResources(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
self.abc.TraversableResources
|
||||
del self.abc.TraversableResources
|
||||
|
||||
|
||||
(Frozen_DeprecatedAttrsTests,
|
||||
|
|
Loading…
Reference in New Issue