(self, pytester: Pytester)
| 551 | reprec.assertoutcome(passed=1) |
| 552 | |
| 553 | def test_doctestmodule_three_tests(self, pytester: Pytester): |
| 554 | p = pytester.makepyfile( |
| 555 | """ |
| 556 | ''' |
| 557 | >>> p = getfixture('tmp_path') |
| 558 | >>> p.is_dir() |
| 559 | True |
| 560 | ''' |
| 561 | def my_func(): |
| 562 | ''' |
| 563 | >>> magic = 42 |
| 564 | >>> magic - 42 |
| 565 | 0 |
| 566 | ''' |
| 567 | def useless(): |
| 568 | pass |
| 569 | def another(): |
| 570 | ''' |
| 571 | >>> import os |
| 572 | >>> os is os |
| 573 | True |
| 574 | ''' |
| 575 | """ |
| 576 | ) |
| 577 | reprec = pytester.inline_run(p, "--doctest-modules") |
| 578 | reprec.assertoutcome(passed=3) |
| 579 | |
| 580 | def test_doctestmodule_two_tests_one_fail(self, pytester: Pytester): |
| 581 | p = pytester.makepyfile( |
nothing calls this directly
no test coverage detected