bpo-27200: fix unittest.mock doctests. by marco-buttu · Pull Request #821 · python/cpython
@berkerpeksag, it is done but we have a problem :( Skipping the tests that do not pass, we touch a lot of lines, more than in the previous version:
- Spikking tests (485 tests executed, 0 failures): 2 files changed,+642 -464;
- Executing tests (666 tests executed, 0 failures): 8 files changed, +213, -25.
That is because a lot of examples are chained, and when we skip one of them, we need to skip all next examples that use the names defined in the skipped test. And bacause we are skipping the examples using the doctest directive, instead of :: (as discussed in #604), we need to deindent them to align the code to the doctest. That is why we are touching a lot of lines. What if we apply the "Although practicality beats purity" aphorism of the Zen, and for this PR we use the :: instead of the doctest directive? The review will be much easier