File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,13 @@ def sigterm_handler(sig, frame):
46
46
jpype .startJVM (interrupt = False )
47
47
48
48
def setUp (self ):
49
+ if sys .platform == "win32" :
50
+ raise unittest .SkipTest ("signals test not applicable on windows" )
49
51
self .sigint_event .clear ()
50
52
self .sigterm_event .clear ()
51
53
52
54
def testSigInt (self ):
53
- if sys .platform == "win32" :
54
- os .kill (os .getpid (), signal .CTRL_C_EVENT )
55
- else :
56
- os .kill (os .getpid (), signal .SIGINT )
55
+ os .kill (os .getpid (), signal .SIGINT )
57
56
58
57
# the test is executed in the main thread. The signal cannot interrupt the threading.Event.wait() call
59
58
# so asserting the return value of `wait` does not work.
@@ -64,8 +63,6 @@ def testSigInt(self):
64
63
self .assertFalse (self .sigterm_event .is_set ())
65
64
66
65
def testSigTerm (self ):
67
- if sys .platform == "win32" :
68
- raise unittest .SkipTest ("SIGTERM test not applicable on windows" )
69
66
os .kill (os .getpid (), signal .SIGTERM )
70
67
71
68
self .sigterm_event .wait (0.1 )
You can’t perform that action at this time.
0 commit comments