aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>2022-04-04 19:35:29 -0700
committerGitHub <noreply@github.com>2022-04-04 19:35:29 -0700
commit5a4973e29f2f5c4ee8c086f40325786c62381540 (patch)
tree299614c1035acc20242c9e73156b70b40c3cc200 /Lib/test/test_pydoc.py
parentbb86d1d9fbd1888524e04475383f4ea764277f67 (diff)
downloadcpython-5a4973e29f2f5c4ee8c086f40325786c62381540.tar.gz
cpython-5a4973e29f2f5c4ee8c086f40325786c62381540.zip
bpo-46998: Allow subclassing Any at runtime (GH-31841)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index 9c900c3e8ee..13c77b6fa68 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -1066,14 +1066,14 @@ class TestDescriptions(unittest.TestCase):
self.assertIn(types.UnionType.__doc__.strip().splitlines()[0], doc)
def test_special_form(self):
- self.assertEqual(pydoc.describe(typing.Any), '_SpecialForm')
- doc = pydoc.render_doc(typing.Any, renderer=pydoc.plaintext)
+ self.assertEqual(pydoc.describe(typing.NoReturn), '_SpecialForm')
+ doc = pydoc.render_doc(typing.NoReturn, renderer=pydoc.plaintext)
self.assertIn('_SpecialForm in module typing', doc)
- if typing.Any.__doc__:
- self.assertIn('Any = typing.Any', doc)
- self.assertIn(typing.Any.__doc__.strip().splitlines()[0], doc)
+ if typing.NoReturn.__doc__:
+ self.assertIn('NoReturn = typing.NoReturn', doc)
+ self.assertIn(typing.NoReturn.__doc__.strip().splitlines()[0], doc)
else:
- self.assertIn('Any = class _SpecialForm(_Final)', doc)
+ self.assertIn('NoReturn = class _SpecialForm(_Final)', doc)
def test_typing_pydoc(self):
def foo(data: typing.List[typing.Any],