Skip to content

Commit

Permalink
Fix flakiness in test_subprocess::test_basic
Browse files Browse the repository at this point in the history
python-triogh-1514 introduced a race condition in this test: now if the process
runs quickly enough, the returncode might have magically become
non-None before we check it.

Example failure: https://travis-ci.org/github/python-trio/trio/jobs/690291915

There are other tests that check the 'p.returncode is None' case (e.g.
test_auto_update_returncode), so we can just delete this.
  • Loading branch information
njsmith committed May 23, 2020
1 parent 15facd9 commit edd2ff2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion trio/tests/test_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ async def test_basic():
repr_template = "<trio.Process {!r}: {{}}>".format(EXIT_TRUE)
async with await open_process(EXIT_TRUE) as proc:
assert isinstance(proc, Process)
assert proc.returncode is None
assert repr(proc) == repr_template.format(
"running with PID {}".format(proc.pid)
)
Expand Down

0 comments on commit edd2ff2

Please sign in to comment.