From: Nikita Sobolev Date: Sat, 18 Nov 2023 11:13:37 +0000 (+0300) Subject: [3.12] gh-112155: Run `typing.py` doctests during tests (GH-112156) (#112230) X-Git-Tag: v3.12.1~112 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=919be35eae2413dfb59b9517879f69fedec68b7e;p=thirdparty%2FPython%2Fcpython.git [3.12] gh-112155: Run `typing.py` doctests during tests (GH-112156) (#112230) --- diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index ca10a87b0613..a26e80995fef 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -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()