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

Function test_cli_run_shutdown

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

Source from the content-addressed store, hash-verified

1616
1617@pytest.mark.xfail(condition=_is_win32(), reason="flaky on Windows")
1618def test_cli_run_shutdown() -> None:
1619 d = tempfile.TemporaryDirectory()
1620 path = _temp_run_file(d)
1621 port = _get_port()
1622 p = subprocess.Popen(
1623 ["marimo", "run", path, "-p", str(port), "--headless", "--no-token"],
1624 stdin=subprocess.PIPE,
1625 )
1626 _check_started(port)
1627 with _patch_signals_win32():
1628 _interrupt(p)
1629 assert p.poll() is None
1630 assert p.stdin is not None
1631 p.stdin.write(b"y\n")
1632 p.stdin.flush()
1633 time.sleep(3)
1634 assert p.poll() == 0
1635
1636
1637def test_cli_edit_sandbox_prompt() -> None:

Callers

nothing calls this directly

Calls 8

_temp_run_fileFunction · 0.85
_get_portFunction · 0.85
_check_startedFunction · 0.85
_patch_signals_win32Function · 0.85
_interruptFunction · 0.85
pollMethod · 0.80
writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…