(self, pytester: Pytester)
| 316 | result.stdout.fnmatch_lines(["*KeyboardInterrupt*"]) |
| 317 | |
| 318 | def test_keyboard_in_sessionstart(self, pytester: Pytester) -> None: |
| 319 | pytester.makeconftest( |
| 320 | """ |
| 321 | def pytest_sessionstart(): |
| 322 | raise KeyboardInterrupt |
| 323 | """ |
| 324 | ) |
| 325 | pytester.makepyfile( |
| 326 | """ |
| 327 | def test_foobar(): |
| 328 | pass |
| 329 | """ |
| 330 | ) |
| 331 | |
| 332 | result = pytester.runpytest(no_reraise_ctrlc=True) |
| 333 | assert result.ret == 2 |
| 334 | result.stdout.fnmatch_lines(["*KeyboardInterrupt*"]) |
| 335 | |
| 336 | def test_collect_single_item(self, pytester: Pytester) -> None: |
| 337 | """Use singular 'item' when reporting a single test item""" |
nothing calls this directly
no test coverage detected