summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_signal.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-07-04 23:15:08 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-07-04 23:15:08 (GMT)
commit68757ac8840dbe996735e51047d6b45c77456501 (patch)
tree39a44254ae3f92f13f2ab583a4ce64cca89afcf9 /Lib/test/test_signal.py
parent87e78ce1c65c299e5eeb07815a6b6e54a64aa673 (diff)
downloadcpython-68757ac8840dbe996735e51047d6b45c77456501.zip
cpython-68757ac8840dbe996735e51047d6b45c77456501.tar.gz
cpython-68757ac8840dbe996735e51047d6b45c77456501.tar.bz2
Issue #12469: test_signal checks wakeup signals order, except on freebsd6
On FreeBSD 6, when signals are unblocked, FreeBSD 6 delivers signals in the reverse order of their number.
Diffstat (limited to 'Lib/test/test_signal.py')
-rw-r--r--Lib/test/test_signal.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py
index 1d02141..21113be 100644
--- a/Lib/test/test_signal.py
+++ b/Lib/test/test_signal.py
@@ -240,10 +240,10 @@ class WakeupSignalTests(unittest.TestCase):
def check_signum(signals):
data = os.read(read, len(signals)+1)
raised = struct.unpack('%uB' % len(data), data)
- # We don't care of the signal delivery order (it's not portable or
- # reliable)
- raised = set(raised)
- signals = set(signals)
+ if sys.platform == 'freebsd6':
+ # when signals are unblocked, FreeBSD 6 delivers signals in the
+ # reverse order of their number
+ signals = tuple(sorted(signals, reverse=False))
if raised != signals:
raise Exception("%r != %r" % (raised, signals))