(pytester: Pytester)
| 159 | |
| 160 | |
| 161 | def test_doctest_items(pytester: Pytester) -> None: |
| 162 | pytester.makepyfile( |
| 163 | ''' |
| 164 | def foo(): |
| 165 | """ |
| 166 | >>> 1 + 1 |
| 167 | 2 |
| 168 | """ |
| 169 | ''' |
| 170 | ) |
| 171 | pytester.maketxtfile( |
| 172 | """ |
| 173 | >>> 1 + 1 |
| 174 | 2 |
| 175 | """ |
| 176 | ) |
| 177 | result = pytester.runpytest( |
| 178 | "--fixtures-per-test", "--doctest-modules", "--doctest-glob=*.txt", "-v" |
| 179 | ) |
| 180 | assert result.ret == 0 |
| 181 | |
| 182 | result.stdout.fnmatch_lines(["*collected 2 items*"]) |
| 183 | |
| 184 | |
| 185 | def test_multiline_docstring_in_module(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected