3 ms·
That's brilliant! https://github.com/scientific-python/pytest-doctestplus https://github.com/scientific-python/pytest-doctestplus seems to be similar working in
by btown 3y ago
That's brilliant! https://github.com/scientific-python/pytest-doctestplus https://github.com/scientific-python/pytest-doctestplus seems to be similar working in the opposite direction, using the documentation source as the single location for test code. I like your approach better and wish there was more support for that pattern more generally!
- boxed 3y agoI started with that approach actually. It turned untenable after a while. It's just much nicer to have the documentation just a part of your normal test suite without any preprocessing. That also means you get coverage in the normal way too.