(env, target, kwargs)
| 733 | ('pause', {'interval': 10}) |
| 734 | ]) |
| 735 | def test_sigint(env, target, kwargs): |
| 736 | backend = env.get("MPLBACKEND") |
| 737 | if not backend.startswith(("qt", "macosx")): |
| 738 | pytest.skip("SIGINT currently only tested on qt and macosx") |
| 739 | source = (inspect.getsource(_test_sigint_impl) + |
| 740 | f"\n_test_sigint_impl({backend!r}, {target!r}, {kwargs!r})") |
| 741 | with _WaitForStringPopen([sys.executable, "-c", source]) as proc: |
| 742 | try: |
| 743 | proc.wait_for('DRAW') |
| 744 | stdout, _ = proc.communicate(timeout=_test_timeout) |
| 745 | except Exception: |
| 746 | proc.kill() |
| 747 | stdout, _ = proc.communicate() |
| 748 | raise |
| 749 | assert 'SUCCESS' in stdout |
| 750 | |
| 751 | |
| 752 | def _test_other_signal_before_sigint_impl(backend, target_name, kwargs): |
nothing calls this directly
no test coverage detected
searching dependent graphs…