summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_typing.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_typing.py')
-rw-r--r--Lib/test/test_typing.py24
1 files changed, 1 insertions, 23 deletions
diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py
index 9a3e642..b4a5a68 100644
--- a/Lib/test/test_typing.py
+++ b/Lib/test/test_typing.py
@@ -7529,17 +7529,6 @@ class IOTests(BaseTestCase):
a = stuff.__annotations__['a']
self.assertEqual(a.__parameters__, ())
- 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)
- self.assertIs(BinaryIO, typing.BinaryIO)
- self.assertEqual(set(__all__), set(['IO', 'TextIO', 'BinaryIO']))
- self.assertEqual(__name__, 'typing.io')
- self.assertEqual(len(w), 1)
-
class RETests(BaseTestCase):
# Much of this is really testing _TypeAlias.
@@ -7584,16 +7573,6 @@ class RETests(BaseTestCase):
self.assertEqual(repr(Match[str]), 'typing.Match[str]')
self.assertEqual(repr(Match[bytes]), 'typing.Match[bytes]')
- 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)
- self.assertEqual(set(__all__), set(['Match', 'Pattern']))
- self.assertEqual(__name__, 'typing.re')
- self.assertEqual(len(w), 1)
-
def test_cannot_subclass(self):
with self.assertRaisesRegex(
TypeError,
@@ -8765,7 +8744,7 @@ class AllTests(BaseTestCase):
# Context managers.
self.assertIn('ContextManager', a)
self.assertIn('AsyncContextManager', a)
- # Check that io and re are not exported.
+ # Check that former namespaces io and re are not exported.
self.assertNotIn('io', a)
self.assertNotIn('re', a)
# Spot-check that stdlib modules aren't exported.
@@ -8785,7 +8764,6 @@ class AllTests(BaseTestCase):
if k in actual_all or (
# avoid private names
not k.startswith('_') and
- k not in {'io', 're'} and
# there's a few types and metaclasses that aren't exported
not k.endswith(('Meta', '_contra', '_co')) and
not k.upper() == k and