Skip to content

Commit c5d700f

Browse files
Reset DeprecationWarning filters in test_typing io and re (#26811)
1 parent 06cda80 commit c5d700f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/test/test_typing.py

+2
Original file line numberDiff line numberDiff line change
@@ -3998,6 +3998,7 @@ def stuff(a: BinaryIO) -> bytes:
39983998

39993999
def test_io_submodule(self):
40004000
with warnings.catch_warnings(record=True) as w:
4001+
warnings.filterwarnings("default", category=DeprecationWarning)
40014002
from typing.io import IO, TextIO, BinaryIO, __all__, __name__
40024003
self.assertIs(IO, typing.IO)
40034004
self.assertIs(TextIO, typing.TextIO)
@@ -4052,6 +4053,7 @@ def test_repr(self):
40524053

40534054
def test_re_submodule(self):
40544055
with warnings.catch_warnings(record=True) as w:
4056+
warnings.filterwarnings("default", category=DeprecationWarning)
40554057
from typing.re import Match, Pattern, __all__, __name__
40564058
self.assertIs(Match, typing.Match)
40574059
self.assertIs(Pattern, typing.Pattern)
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Importing typing.io or typing.re now prints a `DeprecationWarning`.
1+
Importing typing.io or typing.re now prints a ``DeprecationWarning``.

0 commit comments

Comments
 (0)