Skip to content

Commit

Permalink
sleep after flushing stdout
Browse files Browse the repository at this point in the history
flushing stdout doesn't guarantee its arrival before stderr because they could arrive in the same tic
  • Loading branch information
minrk committed Dec 12, 2018
1 parent 6a71ae6 commit 92b374b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ def test_pipes_stderr():
with pipes(stdout=stdout, stderr=STDOUT) as (_stdout, _stderr):
printf(u"Hellø")
libc.fflush(c_stdout_p)
time.sleep(0.1)
printf_err(u"Hi, stdérr")
libc.fflush(c_stderr_p)
assert _stdout is stdout
assert _stderr is None

Expand Down

0 comments on commit 92b374b

Please sign in to comment.