Ellispis does not seem to work to ignore the whole output line.
I'd like to ignore everything that is outputed by foo
:
def foo():
"""
>>> foo() # doctest: +ELLIPSIS
...
"""
print("IGNORE ME")
if __name__ == '__main__':
import doctest
doctest.testmod()
Running with python3 gives:
Failed example:
foo() # doctest: +ELLIPSIS
Expected nothing
Got:
IGNORE ME
**********************************************************************
1 items had failures:
1 of 1 in __main__.foo
***Test Failed*** 1 failures.
Note that ignoring only part of the output works. Adding a character before ...
(here "-"):
def foo():
"""
>>> foo() # doctest: +ELLIPSIS
-...
"""
print("-IGNORE ME")
if __name__ == '__main__':
import doctest
doctest.testmod()