[pypy-commit] pypy win32-cleanup2: fix tests: 7 is a valid signal enum on some platforms, rework bad expression
mattip
noreply at buildbot.pypy.org
Mon Apr 23 21:05:00 CEST 2012
Author: Matti Picus <matti.picus at gmail.com>
Branch: win32-cleanup2
Changeset: r54691:37a21c90d685
Date: 2012-04-23 22:04 +0300
http://bitbucket.org/pypy/pypy/changeset/37a21c90d685/
Log: fix tests: 7 is a valid signal enum on some platforms, rework bad
expression
diff --git a/pypy/module/signal/test/test_signal.py b/pypy/module/signal/test/test_signal.py
--- a/pypy/module/signal/test/test_signal.py
+++ b/pypy/module/signal/test/test_signal.py
@@ -52,9 +52,9 @@
if not hasattr(os, 'kill') or not hasattr(os, 'getpid'):
skip("requires os.kill() and os.getpid()")
signal = self.signal # the signal module to test
- try:
- signum = signal.USR1
- except:
+ if hasattr(signal,'SIGUSR1'):
+ signum = signal.SIGUSR1
+ else:
signum = signal.CTRL_BREAK_EVENT
received = []
@@ -154,7 +154,7 @@
raises(ValueError, getsignal, 4444)
raises(ValueError, signal, 4444, lambda *args: None)
- raises(ValueError, signal, 7, lambda *args: None)
+ raises(ValueError, signal, 42, lambda *args: None)
def test_alarm(self):
try:
More information about the pypy-commit
mailing list