Skip to content

Commit add0368

Browse files
committed
Start the startup-mode test's pager without site-packages
cmd2 lends a new pipeline the terminal for its 0.2s startup check, and a pager must set its terminal modes within it. Coverage's subprocess hook, loaded from site-packages, started coverage in the test's Python pager and slowed its startup enough on a busy macOS runner to miss that window. Its tcsetattr() then ran in the background and failed with EINTR. Run the pager with -S so it starts as quickly as less would.
1 parent b20de83 commit add0368

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎tests/test_pipeline_job_control.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,10 @@ def wait_until(predicate):
622622
wait_until(lambda: "OUTER> " in transcript)
623623
os.write(master, f"{shlex.quote(sys.executable)} {shlex.quote(str(application))}\n".encode())
624624
wait_until(lambda: "TEST>" in transcript)
625-
os.write(master, f"help -v | {shlex.quote(sys.executable)} {shlex.quote(str(pager))}\n".encode())
625+
# cmd2 lends the terminal for its 0.2s startup check. Like less, the pager must set its modes
626+
# within it. -S skips site-packages, where coverage's subprocess hook would otherwise start
627+
# coverage in the pager and slow its startup enough on a busy CI runner to miss that window.
628+
os.write(master, f"help -v | {shlex.quote(sys.executable)} -S {shlex.quote(str(pager))}\n".encode())
626629
wait_until(outcome.exists)
627630
wait_until(lambda: outcome.read_text() != "")
628631
assert outcome.read_text() == "ok"

0 commit comments

Comments
 (0)