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