MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_sigint

Function test_sigint

lib/matplotlib/tests/test_backends_interactive.py:735–749  ·  view source on GitHub ↗
(env, target, kwargs)

Source from the content-addressed store, hash-verified

733 ('pause', {'interval': 10})
734])
735def 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
752def _test_other_signal_before_sigint_impl(backend, target_name, kwargs):

Callers

nothing calls this directly

Calls 3

_WaitForStringPopenClass · 0.85
wait_forMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…