Skip to content

Commit cf985f5

Browse files
test: terminate windows subprocess using kill in tests (microsoft#711)
1 parent 734d87b commit cf985f5

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tests/conftest.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,7 @@ def kill(self):
238238
# Send the signal to all the process groups
239239
if self.process.poll() is not None:
240240
return
241-
if sys.platform == "win32":
242-
subprocess.check_call(
243-
["taskkill", "/F", "/PID", str(self.process.pid)],
244-
stderr=subprocess.DEVNULL,
245-
stdout=subprocess.DEVNULL,
246-
)
247-
else:
248-
self.process.kill()
241+
self.process.kill()
249242
self.process.wait()
250243

251244

0 commit comments

Comments
 (0)