(self, pytester: Pytester)
| 318 | ) |
| 319 | |
| 320 | def test_doctest_linedata_missing(self, pytester: Pytester): |
| 321 | pytester.path.joinpath("hello.py").write_text( |
| 322 | textwrap.dedent( |
| 323 | """\ |
| 324 | class Fun(object): |
| 325 | @property |
| 326 | def test(self): |
| 327 | ''' |
| 328 | >>> a = 1 |
| 329 | >>> 1/0 |
| 330 | ''' |
| 331 | """ |
| 332 | ) |
| 333 | ) |
| 334 | result = pytester.runpytest("--doctest-modules") |
| 335 | result.stdout.fnmatch_lines( |
| 336 | ["*hello*", "006*>>> 1/0*", "*UNEXPECTED*ZeroDivision*", "*1 failed*"] |
| 337 | ) |
| 338 | |
| 339 | def test_doctest_linedata_on_property(self, pytester: Pytester): |
| 340 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected