File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,13 @@ async def test():
2020 proc = await asyncio .create_subprocess_shell (
2121 cmd ,
2222 env = env ,
23- stdin = subprocess .PIPE ,
2423 stdout = subprocess .PIPE ,
2524 stderr = subprocess .PIPE ,
2625 loop = self .loop )
2726
28- exitcode = await proc .wait ()
29- self .assertEqual (exitcode , 0 )
30-
31- out = await proc .stdout .read ()
27+ out , _ = await proc .communicate ()
3228 self .assertEqual (out , b'spam\n ' )
29+ self .assertEqual (proc .returncode , 0 )
3330
3431 self .loop .run_until_complete (test ())
3532
@@ -42,16 +39,13 @@ async def test():
4239 cmd ,
4340 cwd = cwd ,
4441 env = env ,
45- stdin = subprocess .PIPE ,
4642 stdout = subprocess .PIPE ,
4743 stderr = subprocess .PIPE ,
4844 loop = self .loop )
4945
50- exitcode = await proc .wait ()
51- self .assertEqual (exitcode , 0 )
52-
53- out = await proc .stdout .read ()
46+ out , _ = await proc .communicate ()
5447 self .assertEqual (out , b'/\n ' )
48+ self .assertEqual (proc .returncode , 0 )
5549
5650 self .loop .run_until_complete (test ())
5751
You can’t perform that action at this time.
0 commit comments