Changes variable name so it better describes what it does now.
This commit is contained in:
parent
51fa244650
commit
94731fc2a1
|
@ -111,7 +111,7 @@ class DoctestItem(pytest.Item):
|
||||||
message = excinfo.type.__name__
|
message = excinfo.type.__name__
|
||||||
reprlocation = ReprFileLocation(filename, lineno, message)
|
reprlocation = ReprFileLocation(filename, lineno, message)
|
||||||
checker = _get_checker()
|
checker = _get_checker()
|
||||||
REPORT_UDIFF = _get_report_choice(self.config.getoption("doctestreport"))
|
report_choice = _get_report_choice(self.config.getoption("doctestreport"))
|
||||||
if lineno is not None:
|
if lineno is not None:
|
||||||
lines = doctestfailure.test.docstring.splitlines(False)
|
lines = doctestfailure.test.docstring.splitlines(False)
|
||||||
# add line numbers to the left of the error message
|
# add line numbers to the left of the error message
|
||||||
|
@ -127,7 +127,7 @@ class DoctestItem(pytest.Item):
|
||||||
indent = '...'
|
indent = '...'
|
||||||
if excinfo.errisinstance(doctest.DocTestFailure):
|
if excinfo.errisinstance(doctest.DocTestFailure):
|
||||||
lines += checker.output_difference(example,
|
lines += checker.output_difference(example,
|
||||||
doctestfailure.got, REPORT_UDIFF).split("\n")
|
doctestfailure.got, report_choice).split("\n")
|
||||||
else:
|
else:
|
||||||
inner_excinfo = ExceptionInfo(excinfo.value.exc_info)
|
inner_excinfo = ExceptionInfo(excinfo.value.exc_info)
|
||||||
lines += ["UNEXPECTED EXCEPTION: %s" %
|
lines += ["UNEXPECTED EXCEPTION: %s" %
|
||||||
|
|
Loading…
Reference in New Issue