Raise pytest.skip() if all examples in the given DocTest have the SKIP option set.
(test: "doctest.DocTest")
| 548 | |
| 549 | |
| 550 | def _check_all_skipped(test: "doctest.DocTest") -> None: |
| 551 | """Raise pytest.skip() if all examples in the given DocTest have the SKIP |
| 552 | option set.""" |
| 553 | import doctest |
| 554 | |
| 555 | all_skipped = all(x.options.get(doctest.SKIP, False) for x in test.examples) |
| 556 | if all_skipped: |
| 557 | pytest.skip("all docstests skipped by +SKIP option") |
| 558 | |
| 559 | |
| 560 | def _is_mocked(obj: object) -> bool: |