Show More
@@ -85,17 +85,16 b' def test_skip_dt_decorator():' | |||
|
85 | 85 | """Doctest-skipping decorator should preserve the docstring. |
|
86 | 86 | """ |
|
87 | 87 | # Careful: 'check' must be a *verbatim* copy of the doctest_bad docstring! |
|
88 | check = dedent( | |
|
89 | """A function whose doctest we need to skip. | |
|
88 | check = """A function whose doctest we need to skip. | |
|
90 | 89 | |
|
91 | 90 | >>> 1+1 |
|
92 | 91 | 3 |
|
93 | 92 |
|
|
94 | ) | |
|
93 | ||
|
95 | 94 | # Fetch the docstring from doctest_bad after decoration. |
|
96 | 95 | val = doctest_bad.__doc__ |
|
97 | ||
|
98 | assert check == val, "doctest_bad docstrings don't match" | |
|
96 | ||
|
97 | assert dedent(check) == dedent(val), "doctest_bad docstrings don't match" | |
|
99 | 98 | |
|
100 | 99 | |
|
101 | 100 | # Doctest skipping should work for class methods too |
General Comments 0
You need to be logged in to leave comments.
Login now