]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-112155: Run `typing.py` doctests during tests (GH-112156) (#112230)
authorNikita Sobolev <mail@sobolevn.me>
Sat, 18 Nov 2023 11:13:37 +0000 (14:13 +0300)
committerGitHub <noreply@github.com>
Sat, 18 Nov 2023 11:13:37 +0000 (11:13 +0000)
Lib/test/test_typing.py

index ca10a87b06130d7066961f256dcb6cd301ff13ec..a26e80995fef3f6a7c628e1e99b26a50ddf7a86d 100644 (file)
@@ -9282,5 +9282,11 @@ class TypeIterationTests(BaseTestCase):
             self.assertNotIsInstance(type_to_test, collections.abc.Iterable)
 
 
+def load_tests(loader, tests, pattern):
+    import doctest
+    tests.addTests(doctest.DocTestSuite(typing))
+    return tests
+
+
 if __name__ == '__main__':
     main()