You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix usage of +IGNORE_WARNING directive with the ..doctest-remote-data :: directive #147
@saimn@pllim - we're kind of stuck here. This code chunck is skipped as expected with the new directive, but the test comes back as "passed" rather than "skipped". Have you recall any similar situation, or the reason for this?
changed the title [-]Fix: Usage of `+IGNORE_WARNING` directive with the `..doctest-remote-data ::` directive[/-][+]Fix usage of `+IGNORE_WARNING` directive with the `..doctest-remote-data ::` directive[/+]on Jan 12, 2021
Testing the new remote data directive with the +IGNORE_WARNINGS directive, the test should be skipped if remote data is not requested. It is skipped but the assertion outcome is passed instead of skipped.
tl;dr -- A test that should have been skipped is shown as passed even when it is skipped, which is very misleading. Only happens when the embedded code has +IGNORE_WARNINGS directive. If you run this with #137 , you can see the behavior. Run it with and without +IGNORE_WARNINGS to see the difference.
Content of testme.rst:
#This test is skipped when remote data is not requested, as it should
#but when remote data is requested the +FLOAT_CMP directive fails
.. doctest-remote-data::
>>> x =1/3.
>>> x # doctest: +FLOAT_CMP +IGNORE_WARNING0.333333## do some failing to check whether the whole block is indeed skipped
>>> 1+13
pytest testme.rst --doctest-plus --doctest-rst --remote-data fails as expected.
pytest testme.rst --doctest-plus --doctest-rst with +IGNORE_WARNINGS shows it as passing (green) -- WRONG
pytest testme.rst --doctest-plus --doctest-rst without +IGNORE_WARNINGS shows it as skipped (yellow) -- CORRECT
Activity
[-]Fix: Usage of `+IGNORE_WARNING` directive with the `..doctest-remote-data ::` directive[/-][+]Fix usage of `+IGNORE_WARNING` directive with the `..doctest-remote-data ::` directive[/+]tinuademargaret commentedon Jan 12, 2021
Testing the new remote data directive with the +IGNORE_WARNINGS directive, the test should be skipped if remote data is not requested. It is skipped but the assertion outcome is passed instead of skipped.
saimn commentedon Jan 15, 2021
Can you explain more in detail the issue ? It's not clear to me from the other PR.
pllim commentedon Jan 15, 2021
tl;dr -- A test that should have been skipped is shown as passed even when it is skipped, which is very misleading. Only happens when the embedded code has
+IGNORE_WARNINGSdirective. If you run this with #137 , you can see the behavior. Run it with and without+IGNORE_WARNINGSto see the difference.Content of
testme.rst:pytest testme.rst --doctest-plus --doctest-rst --remote-datafails as expected.pytest testme.rst --doctest-plus --doctest-rstwith+IGNORE_WARNINGSshows it as passing (green) -- WRONGpytest testme.rst --doctest-plus --doctest-rstwithout+IGNORE_WARNINGSshows it as skipped (yellow) -- CORRECT