MCPcopy
hub / github.com/marimo-team/marimo / test_cli_edit_interrupt_twice

Function test_cli_edit_interrupt_twice

tests/_cli/test_cli.py:1551–1571  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1549
1550@pytest.mark.xfail(condition=_is_win32(), reason="flaky on Windows")
1551def test_cli_edit_interrupt_twice() -> None:
1552 # two SIGINTs should kill the CLI
1553 port = _get_port()
1554 p = subprocess.Popen(
1555 [
1556 "marimo",
1557 "edit",
1558 "-p",
1559 str(port),
1560 "--headless",
1561 "--no-token",
1562 "--skip-update-check",
1563 ]
1564 )
1565 _check_started(port)
1566 with _patch_signals_win32():
1567 _interrupt(p)
1568 assert p.poll() is None
1569 _interrupt(p)
1570 # exit code is system dependent when killed by signal
1571 _check_shutdown(p, check_fn=lambda code: code is not None)
1572
1573
1574@pytest.mark.xfail(condition=_is_win32(), reason="flaky on Windows")

Callers

nothing calls this directly

Calls 6

_get_portFunction · 0.85
_check_startedFunction · 0.85
_patch_signals_win32Function · 0.85
_interruptFunction · 0.85
_check_shutdownFunction · 0.85
pollMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…