(
self, session: "Session", exitstatus: Union[int, ExitCode]
)
| 786 | |
| 787 | @hookimpl(hookwrapper=True) |
| 788 | def pytest_sessionfinish( |
| 789 | self, session: "Session", exitstatus: Union[int, ExitCode] |
| 790 | ): |
| 791 | outcome = yield |
| 792 | outcome.get_result() |
| 793 | self._tw.line("") |
| 794 | summary_exit_codes = ( |
| 795 | ExitCode.OK, |
| 796 | ExitCode.TESTS_FAILED, |
| 797 | ExitCode.INTERRUPTED, |
| 798 | ExitCode.USAGE_ERROR, |
| 799 | ExitCode.NO_TESTS_COLLECTED, |
| 800 | ) |
| 801 | if exitstatus in summary_exit_codes and not self.no_summary: |
| 802 | self.config.hook.pytest_terminal_summary( |
| 803 | terminalreporter=self, exitstatus=exitstatus, config=self.config |
| 804 | ) |
| 805 | if session.shouldfail: |
| 806 | self.write_sep("!", str(session.shouldfail), red=True) |
| 807 | if exitstatus == ExitCode.INTERRUPTED: |
| 808 | self._report_keyboardinterrupt() |
| 809 | self._keyboardinterrupt_memo = None |
| 810 | elif session.shouldstop: |
| 811 | self.write_sep("!", str(session.shouldstop), red=True) |
| 812 | self.summary_stats() |
| 813 | |
| 814 | @hookimpl(hookwrapper=True) |
| 815 | def pytest_terminal_summary(self) -> Generator[None, None, None]: |
nothing calls this directly
no test coverage detected