Raise pytest.skip() if all examples in the given DocTest have the SKIP option set.
(test: doctest.DocTest)
| 449 | |
| 450 | |
| 451 | def _check_all_skipped(test: doctest.DocTest) -> None: |
| 452 | """Raise pytest.skip() if all examples in the given DocTest have the SKIP |
| 453 | option set.""" |
| 454 | import doctest |
| 455 | |
| 456 | all_skipped = all(x.options.get(doctest.SKIP, False) for x in test.examples) |
| 457 | if all_skipped: |
| 458 | skip("all tests skipped by +SKIP option") |
| 459 | |
| 460 | |
| 461 | def _is_mocked(obj: object) -> bool: |