Skip to content

Commit f790de2

Browse files
committed
Fix windows test
1 parent ba31f4f commit f790de2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/snippets/stdlib_subprocess.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,18 @@
4040
p = subprocess.Popen(["sleep", "2"])
4141
p.terminate()
4242
p.wait()
43-
assert p.returncode == -signal.SIGTERM
43+
if "win" not in sys.platform:
44+
assert p.returncode == -signal.SIGTERM
45+
else:
46+
assert p.returncode == 1
4447

4548
p = subprocess.Popen(["sleep", "2"])
4649
p.kill()
4750
p.wait()
48-
assert p.returncode == -signal.SIGKILL
51+
if "win" not in sys.platform:
52+
assert p.returncode == -signal.SIGKILL
53+
else:
54+
assert p.returncode == 1
4955

5056
p = subprocess.Popen(["echo", "test"], stdout=subprocess.PIPE)
5157
(stdout, stderr) = p.communicate()

0 commit comments

Comments
 (0)