mirror of
https://github.com/python/cpython.git
synced 2025-08-17 23:31:09 +00:00
[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
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue