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():
20
20
proc = await asyncio .create_subprocess_shell (
21
21
cmd ,
22
22
env = env ,
23
- stdin = subprocess .PIPE ,
24
23
stdout = subprocess .PIPE ,
25
24
stderr = subprocess .PIPE ,
26
25
loop = self .loop )
27
26
28
- exitcode = await proc .wait ()
29
- self .assertEqual (exitcode , 0 )
30
-
31
- out = await proc .stdout .read ()
27
+ out , _ = await proc .communicate ()
32
28
self .assertEqual (out , b'spam\n ' )
29
+ self .assertEqual (proc .returncode , 0 )
33
30
34
31
self .loop .run_until_complete (test ())
35
32
@@ -42,16 +39,13 @@ async def test():
42
39
cmd ,
43
40
cwd = cwd ,
44
41
env = env ,
45
- stdin = subprocess .PIPE ,
46
42
stdout = subprocess .PIPE ,
47
43
stderr = subprocess .PIPE ,
48
44
loop = self .loop )
49
45
50
- exitcode = await proc .wait ()
51
- self .assertEqual (exitcode , 0 )
52
-
53
- out = await proc .stdout .read ()
46
+ out , _ = await proc .communicate ()
54
47
self .assertEqual (out , b'/\n ' )
48
+ self .assertEqual (proc .returncode , 0 )
55
49
56
50
self .loop .run_until_complete (test ())
57
51
You can’t perform that action at this time.
0 commit comments