Skip to content

Commit 75df36e

Browse files
[3.11] gh-89392: Make test_pep646_syntax discoverable (GH-108861) (GH-108869)
(cherry picked from commit d0b22f6) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent 79f7a4c commit 75df36e

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Lib/test/test_pep646_syntax.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import doctest
2+
13
doctests = """
24
35
Setup
@@ -317,10 +319,10 @@
317319

318320
__test__ = {'doctests' : doctests}
319321

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)
322+
def load_tests(loader, tests, pattern):
323+
tests.addTest(doctest.DocTestSuite())
324+
return tests
325+
324326

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

0 commit comments

Comments
 (0)