Skip to content

Commit

Permalink
Flush test_capture_function_and_subprocess_output print/writes so out…
Browse files Browse the repository at this point in the history
…put is in expected order
  • Loading branch information
blairconrad committed Oct 23, 2024
1 parent b0d1448 commit 8836214
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,9 @@ def test_capture_function_and_subprocess_output(capsys: pytest.CaptureFixture) -
"""

def function() -> None:
print("print")
print("print", flush=True)
sys.stdout.write("sys stdout write\n")
sys.stdout.flush()
os.system("echo os system") # noqa: S605,S607
subprocess.run(["sh", "-c", "echo sh -c echo"], check=False) # noqa: S603,S607

Expand Down

0 comments on commit 8836214

Please sign in to comment.