Skip to content

Commit 1fb0e44

Browse files
committed
correct the os.kill() call in shutdown test
1 parent e40a6de commit 1fb0e44

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

testing/test_basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,7 @@ def test_addSystemEventTrigger(testdir, cmd_opts, kill, event, phase):
11481148

11491149
test_file = """
11501150
import os
1151+
import signal
11511152
11521153
import pytest_twisted
11531154
@@ -1160,7 +1161,7 @@ def test_succeed():
11601161
reactor.addSystemEventTrigger(phase={phase!r}, eventType={event!r}, callable=output_stuff)
11611162
11621163
if {kill!r}:
1163-
os.kill(os.get_pid())
1164+
os.kill(os.getpid(), signal.SIGINT)
11641165
11651166
yield
11661167
""".format(kill=kill, event=event, phase=phase, test_string=test_string)

0 commit comments

Comments
 (0)