| 1 | # file scalene/scalene_profiler.py:300-311 |
| 2 | # lines [300, 301, 302, 308, 309, 311] |
| 3 | # branches [] |
| 4 | |
| 5 | import pytest |
| 6 | import signal |
| 7 | from scalene.scalene_profiler import Scalene |
| 8 | |
| 9 | |
| 10 | def test_interruption_handler(): |
| 11 | with pytest.raises(KeyboardInterrupt): |
| 12 | Scalene.interruption_handler(signal.SIGINT, None) |
| 13 | |
| 14 | |
| 15 | def test_cleanup(): |
| 16 | # This test function is used to clean up after the test_interruption_handler |
| 17 | # Since the interruption handler raises an exception, there is no state to clean up. |
| 18 | pass |