mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[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 d0b22f6bd8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Add "import unittest".
This commit is contained in:
parent
331b0267e2
commit
d5c2d453fd
1 changed files with 8 additions and 5 deletions
|
|
@ -1,3 +1,6 @@
|
|||
import doctest
|
||||
import unittest
|
||||
|
||||
doctests = """
|
||||
|
||||
Setup
|
||||
|
|
@ -317,10 +320,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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue