mirror of https://github.com/python/cpython
Reset DeprecationWarning filters in test_typing io and re (#26811)
This commit is contained in:
parent
06cda808f1
commit
c5d700f0e2
|
@ -3998,6 +3998,7 @@ class IOTests(BaseTestCase):
|
|||
|
||||
def test_io_submodule(self):
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.filterwarnings("default", category=DeprecationWarning)
|
||||
from typing.io import IO, TextIO, BinaryIO, __all__, __name__
|
||||
self.assertIs(IO, typing.IO)
|
||||
self.assertIs(TextIO, typing.TextIO)
|
||||
|
@ -4052,6 +4053,7 @@ class RETests(BaseTestCase):
|
|||
|
||||
def test_re_submodule(self):
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.filterwarnings("default", category=DeprecationWarning)
|
||||
from typing.re import Match, Pattern, __all__, __name__
|
||||
self.assertIs(Match, typing.Match)
|
||||
self.assertIs(Pattern, typing.Pattern)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Importing typing.io or typing.re now prints a `DeprecationWarning`.
|
||||
Importing typing.io or typing.re now prints a ``DeprecationWarning``.
|
||||
|
|
Loading…
Reference in New Issue