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