(self, pytester: Pytester)
| 284 | result.stdout.fnmatch_lines(["*KeyboardInterrupt*"]) |
| 285 | |
| 286 | def test_keyboard_in_sessionstart(self, pytester: Pytester) -> None: |
| 287 | pytester.makeconftest( |
| 288 | """ |
| 289 | def pytest_sessionstart(): |
| 290 | raise KeyboardInterrupt |
| 291 | """ |
| 292 | ) |
| 293 | pytester.makepyfile( |
| 294 | """ |
| 295 | def test_foobar(): |
| 296 | pass |
| 297 | """ |
| 298 | ) |
| 299 | |
| 300 | result = pytester.runpytest(no_reraise_ctrlc=True) |
| 301 | assert result.ret == 2 |
| 302 | result.stdout.fnmatch_lines(["*KeyboardInterrupt*"]) |
| 303 | |
| 304 | def test_collect_single_item(self, pytester: Pytester) -> None: |
| 305 | """Use singular 'item' when reporting a single test item""" |
nothing calls this directly
no test coverage detected