mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Use test_support.run_doctest()
This commit is contained in:
parent
35b34bd326
commit
627728acbc
1 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
from getopt import GetoptError
|
from getopt import GetoptError
|
||||||
from test.test_support import verify, verbose
|
from test.test_support import verify, verbose, run_doctest
|
||||||
import os
|
import os
|
||||||
|
|
||||||
def expectException(teststr, expected, failure=AssertionError):
|
def expectException(teststr, expected, failure=AssertionError):
|
||||||
|
@ -161,8 +161,8 @@ Using long option names is equally easy:
|
||||||
|
|
||||||
__test__ = {'libreftest' : libreftest}
|
__test__ = {'libreftest' : libreftest}
|
||||||
|
|
||||||
import doctest, sys
|
import sys
|
||||||
doctest.testmod(sys.modules[__name__])
|
run_doctest(sys.modules[__name__], verbose)
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue