Doctest-skipping decorator should preserve the docstring.
()
| 84 | |
| 85 | |
| 86 | def test_skip_dt_decorator(): |
| 87 | """Doctest-skipping decorator should preserve the docstring.""" |
| 88 | # Careful: 'check' must be a *verbatim* copy of the doctest_bad docstring! |
| 89 | check = """A function whose doctest we need to skip. |
| 90 | |
| 91 | >>> 1+1 |
| 92 | 3 |
| 93 | """ |
| 94 | |
| 95 | # Fetch the docstring from doctest_bad after decoration. |
| 96 | val = doctest_bad.__doc__ |
| 97 | |
| 98 | assert dedent(check) == dedent(val), "doctest_bad docstrings don't match" |
| 99 | |
| 100 | |
| 101 | # Doctest skipping should work for class methods too |
nothing calls this directly
no test coverage detected
searching dependent graphs…