From 208226802572c8eeda17b3a0d7f214b57c87f7ab Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 31 May 2011 22:31:09 +0200 Subject: Issue #8407: test_signal doesn't check signal delivery order Tthe signal delivery order is not portable or reliable. --- Lib/test/test_signal.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 4bf2d2d..0631390 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -229,12 +229,13 @@ class WakeupSignalTests(unittest.TestCase): def handler(self, signum, frame): pass - def check_signum(self, *signals, **kw): + def check_signum(self, *signals): data = os.read(self.read, len(signals)+1) raised = struct.unpack('%uB' % len(data), data) - if kw.get('unordered', False): - raised = set(raised) - signals = set(signals) + # We don't care of the signal delivery order (it's not portable or + # reliable) + raised = set(raised) + signals = set(signals) self.assertEqual(raised, signals) def test_wakeup_fd_early(self): @@ -291,7 +292,7 @@ class WakeupSignalTests(unittest.TestCase): # Unblocking the 2 signals calls the C signal handler twice signal.pthread_sigmask(signal.SIG_UNBLOCK, (signum1, signum2)) - self.check_signum(signum1, signum2, unordered=True) + self.check_signum(signum1, signum2) def setUp(self): import fcntl -- cgit v0.12