From 67df75d1f25e9a87912448ecb03d7a436da22d80 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Thu, 16 Nov 2023 18:40:09 +0300 Subject: [PATCH] [3.11] gh-112155: Run `typing.py` doctests during tests (GH-112156) --- Lib/test/test_typing.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 30056e49ae29d9..12f78b580effaa 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -8466,5 +8466,11 @@ def test_is_not_instance_of_iterable(self): 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()