8000 [3.12] gh-89392: Make test_pep646_syntax discoverable (GH-108861) (#1… · python/cpython@d5c2d45 · GitHub
[go: up one dir, main page]

Skip to content

Commit d5c2d45

Browse files
[3.12] gh-89392: Make test_pep646_syntax discoverable (GH-108861) (#108871)
* [3.12] gh-89392: Make test_pep646_syntax discoverable (GH-108861). (cherry picked from commit d0b22f6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> * Add "import unittest".
1 parent 331b026 commit d5c2d45

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Lib/test/test_pep646_syntax.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import doctest
2+
import unittest
3+
14
doctests = """
25
36
Setup
@@ -317,10 +320,10 @@
317320

318321
__test__ = {'doctests' : doctests}
319322

320-
def test_main(verbose=False):
321-
from test import support
322-
from test import test_pep646_syntax
323-
return support.run_doctest(test_pep646_syntax, verbose)
323+
def load_tests(loader, tests, pattern):
324+
tests.addTest(doctest.DocTestSuite())
325+
return tests
326+
324327

325328
if __name__ == "__main__":
326-
test_main(verbose=True)
329+
unittest.main()

0 commit comments

Comments
 (0)
0