mirror of
https://github.com/python/cpython.git
synced 2025-08-19 08:11:46 +00:00
[3.13] gh-121279: Re-add prematurely removed import warnings to importlib.abc (#121281)
Fixup for 51724620e8
Fixes https://github.com/python/cpython/issues/121279
This commit is contained in:
parent
ee1db25bc0
commit
dacf4ffa79
3 changed files with 25 additions and 0 deletions
|
@ -913,5 +913,27 @@ class SourceLoaderGetSourceTests:
|
|||
SourceOnlyLoaderMock=SPLIT_SOL)
|
||||
|
||||
|
||||
class DeprecatedAttrsTests:
|
||||
|
||||
"""Test the deprecated attributes can be accessed."""
|
||||
|
||||
def test_deprecated_attr_ResourceReader(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
self.abc.ResourceReader
|
||||
|
||||
def test_deprecated_attr_Traversable(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
self.abc.Traversable
|
||||
|
||||
def test_deprecated_attr_TraversableResources(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
self.abc.TraversableResources
|
||||
|
||||
|
||||
(Frozen_DeprecatedAttrsTests,
|
||||
Source_DeprecatedAttrsTests
|
||||
) = test_util.test_both(DeprecatedAttrsTests, abc=abc)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue