pytest-doctestplus icon indicating copy to clipboard operation
pytest-doctestplus copied to clipboard

Dynamic mark addition (e.g., +SLOW)

Open dboeckenhoff opened this issue 2 years ago • 2 comments

It would be great, if self-defined marks like --slow from user defined parser.addoption in conftest.py could be added as doctest skip "+SLOW" also like "+REMOTE_DATA". This would generalize the remote-data option.

dboeckenhoff avatar Feb 24 '23 11:02 dboeckenhoff

Generally I avoid writing doc example that would be slow in the first place. But I guess sometimes that is unavoidable?

The dynamic part might be tricky but then again I am not expert in the internals here, so you are welcome to take a stab at it if you want. Thanks!

pllim avatar Feb 24 '23 12:02 pllim

Usually the reason to avoid it is, that it is included in tests. Usually you would also want to avoid remote data acces. Isn't that the exact point of this plugin? For now I work with a mock function for the test but it might be something I will go into once I have more incentive. Thanks

dboeckenhoff avatar Feb 24 '23 13:02 dboeckenhoff