Skip to content

Commit c8893b5

Browse files
committed
just kill the test process on windows
everything else seems to break pytest
1 parent 2788f02 commit c8893b5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

mypy/test/testdaemon.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,14 @@ def tearDown(self) -> None:
203203
subprocess.run([sys.executable, "-m", "mypy.dmypy", "stop"], cwd=self.temp_path)
204204

205205
if self.process.poll() is None:
206-
self.process.send_signal(
207-
signal.CTRL_C_EVENT if sys.platform == "win32" else signal.SIGINT
208-
)
209-
try:
210-
self.process.wait(timeout=5)
211-
except subprocess.TimeoutExpired:
206+
if sys.platform == "win32":
212207
self.process.kill()
208+
else:
209+
self.process.send_signal(signal.SIGINT)
210+
try:
211+
self.process.wait(timeout=5)
212+
except subprocess.TimeoutExpired:
213+
self.process.kill()
213214

214215
self.stop_reader = True
215216
if self.reader_thread.is_alive():

0 commit comments

Comments
 (0)