pytest-doctestplus
pytest-doctestplus copied to clipboard
ELLIPSIS enabled in setup.cfg seems no effect
Hi, first of all, great extension and much useful for any doctesting... I was just adding this extension to our package https://github.com/PyTorchLightning/metrics/pull/759 but somehow seems that the definition in setup.py is ignored, I have added
doctest_optionflags =
NORMALIZE_WHITESPACE
ELLIPSIS
# FLOAT_CMP
and running example:
def sample_div(a, b):
"""
>>> sample_div(1.5, 2.9)
0.517...
"""
return a / b
which is failing till I add ELLIPSIS for the specific line
def sample_div(a, b):
"""
>>> sample_div(1.5, 2.9) # doctest: +ELLIPSIS
0.517...
"""
return a / b
Am I doing anything wrong?
here is the CI output: https://github.com/PyTorchLightning/metrics/runs/4835033649?check_suite_focus=true and using following package/versions
pytest 6.2.5
pytest-cov 3.0.0
pytest-doctestplus 0.11.2
pytest-flake8 1.0.7
Sounds like a bug because that use case is supposedly tested at https://github.com/astropy/pytest-doctestplus/blob/main/tests/test_doctestplus.py
Sounds like a bug because that use case is supposedly tested at https://github.com/astropy/pytest-doctestplus/blob/main/tests/test_doctestplus.py
I was checking the order, and keeping just one and NORMALIZE_WHITESPACE works fine but ELLIPSIS not
I remember that we had some issues when combining some of the directives in the config when testing the remote data directive last year but can't recall that we actually identified and fixed the bug.