aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r--Lib/test/test_syntax.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index be8be898d01..aa86d0cd1d4 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1266,6 +1266,7 @@ Corner-cases that used to crash:
"""
import re
+import doctest
import unittest
from test import support
@@ -1554,10 +1555,10 @@ while 1:
self._check_error(source, "too many statically nested blocks")
-def test_main():
- support.run_unittest(SyntaxTestCase)
- from test import test_syntax
- support.run_doctest(test_syntax, verbosity=True)
+def load_tests(loader, tests, pattern):
+ tests.addTest(doctest.DocTestSuite())
+ return tests
+
if __name__ == "__main__":
- test_main()
+ unittest.main()