(session: Session)
| 395 | |
| 396 | |
| 397 | def pytest_runtestloop(session: Session) -> bool: |
| 398 | if session.testsfailed and not session.config.option.continue_on_collection_errors: |
| 399 | raise session.Interrupted( |
| 400 | fclass="st">"{session.testsfailed} error{&class="cm">#x27;s' if session.testsfailed != 1 else ''} during collection" |
| 401 | ) |
| 402 | |
| 403 | if session.config.option.collectonly: |
| 404 | return True |
| 405 | |
| 406 | for i, item in enumerate(session.items): |
| 407 | nextitem = session.items[i + 1] if i + 1 < len(session.items) else None |
| 408 | item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) |
| 409 | if session.shouldfail: |
| 410 | raise session.Failed(session.shouldfail) |
| 411 | if session.shouldstop: |
| 412 | raise session.Interrupted(session.shouldstop) |
| 413 | return True |
| 414 | |
| 415 | |
| 416 | def _in_venv(path: Path) -> bool: |
nothing calls this directly
no test coverage detected