(
checker: doctest.OutputChecker | None = None,
verbose: bool | None = None,
optionflags: int = 0,
continue_on_failure: bool = True,
)
| 229 | |
| 230 | |
| 231 | def _get_runner( |
| 232 | checker: doctest.OutputChecker | None = None, |
| 233 | verbose: bool | None = None, |
| 234 | optionflags: int = 0, |
| 235 | continue_on_failure: bool = True, |
| 236 | ) -> doctest.DocTestRunner: |
| 237 | # We need this in order to do a lazy import on doctest |
| 238 | global RUNNER_CLASS |
| 239 | if RUNNER_CLASS is None: |
| 240 | RUNNER_CLASS = _init_runner_class() |
| 241 | # Type ignored because the continue_on_failure argument is only defined on |
| 242 | # PytestDoctestRunner, which is lazily defined so can't be used as a type. |
| 243 | return RUNNER_CLASS( # type: ignore |
| 244 | checker=checker, |
| 245 | verbose=verbose, |
| 246 | optionflags=optionflags, |
| 247 | continue_on_failure=continue_on_failure, |
| 248 | ) |
| 249 | |
| 250 | |
| 251 | class DoctestItem(Item): |
no test coverage detected