summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pep646_syntax.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-09-04 09:41:58 (GMT)
committerGitHub <noreply@github.com>2023-09-04 09:41:58 (GMT)
commitd0b22f6bd84239e50b43709f98f2bb950222cfe5 (patch)
tree5cdac882fb6d47fc3ee1a63b2691c01e7d56cc61 /Lib/test/test_pep646_syntax.py
parent76f3c043b6c5971d5a13fc6decf87a80ddf7ef95 (diff)
downloadcpython-d0b22f6bd84239e50b43709f98f2bb950222cfe5.zip
cpython-d0b22f6bd84239e50b43709f98f2bb950222cfe5.tar.gz
cpython-d0b22f6bd84239e50b43709f98f2bb950222cfe5.tar.bz2
gh-89392: Make test_pep646_syntax discoverable (GH-108861)
Diffstat (limited to 'Lib/test/test_pep646_syntax.py')
-rw-r--r--Lib/test/test_pep646_syntax.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_pep646_syntax.py b/Lib/test/test_pep646_syntax.py
index 12a4227..def313d 100644
--- a/Lib/test/test_pep646_syntax.py
+++ b/Lib/test/test_pep646_syntax.py
@@ -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()