From 953a1db81fd336fcb4c0702bc53d3e06958f3b64 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 1 Jul 2017 03:34:49 +0300 Subject: [PATCH] Fix(subproc.py): Test bogus subprocess at the beginning When is being run in the middle it meddles with the next process. --- subproc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subproc.py b/subproc.py index fcb7e1e..d16ecc6 100644 --- a/subproc.py +++ b/subproc.py @@ -648,15 +648,15 @@ class Ph: ############################################################################# def test(p=0): - print("\tOpening subprocess:") - p = Subprocess('cat', 1) # set to expire noisily... - print(p) print("\tOpening bogus subprocess, should fail:") try: b = Subprocess('/', 1) print("\tOops! Null-named subprocess startup *succeeded*?!?") except SubprocessError: print("\t...yep, it failed.") + print("\tOpening cat subprocess:") + p = Subprocess('cat', 1) # set to expire noisily... + print(p) print('\tWrite, then read, two newline-teriminated lines, using readline:') p.write('first full line written\n'); p.write('second.\n') print(repr(p.readline())) -- 2.39.2