Skip to content

Commit

Permalink
Revert "More accurate windows test changes"
Browse files Browse the repository at this point in the history
This reverts commit cacdc12.
  • Loading branch information
dfangl committed Feb 3, 2025
1 parent cacdc12 commit 3a69715
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/jpypetest/test_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,13 @@ def sigterm_handler(sig, frame):
jpype.startJVM(interrupt=False)

def setUp(self):
if sys.platform == "win32":
raise unittest.SkipTest("signals test not applicable on windows")
self.sigint_event.clear()
self.sigterm_event.clear()

def testSigInt(self):
if sys.platform == "win32":
os.kill(os.getpid(), signal.CTRL_C_EVENT)
else:
os.kill(os.getpid(), signal.SIGINT)
os.kill(os.getpid(), signal.SIGINT)

# the test is executed in the main thread. The signal cannot interrupt the threading.Event.wait() call
# so asserting the return value of `wait` does not work.
Expand All @@ -64,8 +63,6 @@ def testSigInt(self):
self.assertFalse(self.sigterm_event.is_set())

def testSigTerm(self):
if sys.platform == "win32":
raise unittest.SkipTest("SIGTERM test not applicable on windows")
os.kill(os.getpid(), signal.SIGTERM)

self.sigterm_event.wait(0.1)
Expand Down

0 comments on commit 3a69715

Please sign in to comment.