|
9 | 9 | # stdlib
|
10 | 10 | import math
|
11 | 11 |
|
12 |
| -# this package |
| 12 | +# 3rd party |
13 | 13 | import pytest
|
14 | 14 |
|
| 15 | +# this package |
15 | 16 | from domdf_python_tools import doctools
|
16 | 17 |
|
17 | 18 | # TODO: test sphinxification of docstrings
|
@@ -166,21 +167,24 @@ def function_in_class_with_same_args(self, a, b, c, d):
|
166 | 167 | return
|
167 | 168 |
|
168 | 169 |
|
169 |
| -@pytest.mark.parametrize("docstring, expects", [ |
170 |
| - ("\t\t\t ", ''), |
171 |
| - ("\t\t\t Spam", "Spam"), |
172 |
| - ("\t\t\t Spam \t\t\t", "Spam \t\t\t"), |
173 |
| - ("\t\t\t Spam\n \t\t\t", "Spam\n"), |
174 |
| - (" \t\t\t", ''), |
175 |
| - (" \t\t\tSpam", "Spam"), |
176 |
| - (" \t\t\tSpam\t\t\t ", "Spam\t\t\t "), |
177 |
| - (" \t\t\tSpam\n\t\t\t ", "Spam\n"), |
178 |
| - ('', ''), |
179 |
| - (None, ''), |
180 |
| - (False, ''), |
181 |
| - (0, ''), |
182 |
| - ([], ''), |
183 |
| - ]) |
| 170 | +@pytest.mark.parametrize( |
| 171 | + "docstring, expects", |
| 172 | + [ |
| 173 | + ("\t\t\t ", ''), |
| 174 | + ("\t\t\t Spam", "Spam"), |
| 175 | + ("\t\t\t Spam \t\t\t", "Spam \t\t\t"), |
| 176 | + ("\t\t\t Spam\n \t\t\t", "Spam\n"), |
| 177 | + (" \t\t\t", ''), |
| 178 | + (" \t\t\tSpam", "Spam"), |
| 179 | + (" \t\t\tSpam\t\t\t ", "Spam\t\t\t "), |
| 180 | + (" \t\t\tSpam\n\t\t\t ", "Spam\n"), |
| 181 | + ('', ''), |
| 182 | + (None, ''), |
| 183 | + (False, ''), |
| 184 | + (0, ''), |
| 185 | + ([], ''), |
| 186 | + ] |
| 187 | + ) |
184 | 188 | def test_deindent_string(docstring, expects):
|
185 | 189 | assert doctools.deindent_string(docstring) == expects
|
186 | 190 |
|
|
0 commit comments