]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-89392: Make test_pep646_syntax discoverable (GH-108861)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 4 Sep 2023 09:41:58 +0000 (12:41 +0300)
committerGitHub <noreply@github.com>
Mon, 4 Sep 2023 09:41:58 +0000 (12:41 +0300)
Lib/test/test_pep646_syntax.py

index 12a4227e4dc9591de387f4b8c911219e6d3912ba..def313da89acbdeddab530f093ea8c9cc4fa63d0 100644 (file)
@@ -1,3 +1,5 @@
+import doctest
+
 doctests = """
 
 Setup
@@ -317,10 +319,10 @@ is *not* valid syntax.)
 
 __test__ = {'doctests' : doctests}
 
-def test_main(verbose=False):
-    from test import support
-    from test import test_pep646_syntax
-    return support.run_doctest(test_pep646_syntax, verbose)
+def load_tests(loader, tests, pattern):
+    tests.addTest(doctest.DocTestSuite())
+    return tests
+
 
 if __name__ == "__main__":
-    test_main(verbose=True)
+    unittest.main()