mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Got rid of nooutput() (was used by DocTestCase.debug())
It's redundant, since no output is written anyway: DebugRunner doesn't generate any output for failures and unexpected exceptions, and since verbose=False, it won't generate any output for non-failures either.
This commit is contained in:
parent
b7503ff631
commit
3a3817f506
1 changed files with 1 additions and 5 deletions
|
@ -200,7 +200,6 @@ __all__ = [
|
||||||
'Tester',
|
'Tester',
|
||||||
# 8. Unittest Support
|
# 8. Unittest Support
|
||||||
'DocTestCase',
|
'DocTestCase',
|
||||||
'nooutput',
|
|
||||||
'DocTestSuite',
|
'DocTestSuite',
|
||||||
'DocFileCase',
|
'DocFileCase',
|
||||||
'DocFileTest',
|
'DocFileTest',
|
||||||
|
@ -2105,7 +2104,7 @@ class DocTestCase(unittest.TestCase):
|
||||||
|
|
||||||
runner = DebugRunner(optionflags=self._dt_optionflags,
|
runner = DebugRunner(optionflags=self._dt_optionflags,
|
||||||
checker=self._dt_checker, verbose=False)
|
checker=self._dt_checker, verbose=False)
|
||||||
runner.run(self._dt_test, out=nooutput)
|
runner.run(self._dt_test)
|
||||||
|
|
||||||
def id(self):
|
def id(self):
|
||||||
return self._dt_test.name
|
return self._dt_test.name
|
||||||
|
@ -2119,9 +2118,6 @@ class DocTestCase(unittest.TestCase):
|
||||||
def shortDescription(self):
|
def shortDescription(self):
|
||||||
return "Doctest: " + self._dt_test.name
|
return "Doctest: " + self._dt_test.name
|
||||||
|
|
||||||
def nooutput(*args):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def DocTestSuite(module=None, globs=None, extraglobs=None,
|
def DocTestSuite(module=None, globs=None, extraglobs=None,
|
||||||
optionflags=0, test_finder=None,
|
optionflags=0, test_finder=None,
|
||||||
setUp=lambda: None, tearDown=lambda: None,
|
setUp=lambda: None, tearDown=lambda: None,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue