mattip  committed b052932

windows does not like invalid signums

  • Participants
  • Parent commits 092d0cd

Comments (0)

Files changed (4)

File lib-python/2.7/

 __all__ = ['heappush', 'heappop', 'heapify', 'heapreplace', 'merge',
            'nlargest', 'nsmallest', 'heappushpop']
-from itertools import islice, repeat, count, imap, izip, tee, chain
+    from itertools import islice, repeat, count, imap, izip, tee, chain
+    import sys
+    print sys.path
 from operator import itemgetter
 import bisect

File lib-python/2.7/test/

             signal.signal(-1, handler)
         with self.assertRaises(ValueError):
-            signal.signal(7, handler)
+            pass
+            #signal.signal(7, handler)
+        print 'ok'
 @unittest.skipIf(sys.platform == "win32", "Not valid on Windows")

File pypy/module/signal/

     None -- if an unknown handler is in effect (XXX UNIMPLEMENTED)
     anything else -- the callable Python object used as a handler
-    check_signum_in_range(space, signum)
+    if sys.platform == 'win32':
+        check_signum_exists(space, signum)
+    else:
+        check_signum_in_range(space, signum)
     action = space.check_signal_action
     if signum in action.handlers_w:
         return action.handlers_w[signum]

File pypy/module/signal/test/

             skip("requires os.kill() and os.getpid()")
         signal = self.signal   # the signal module to test
         if not hasattr(signal, 'SIGUSR1'):
-            py.test.skip("requires SIGUSR1 in signal")
+            skip("requires SIGUSR1 in signal")
         signum = signal.SIGUSR1
         received = []
         import sys
         if sys.platform == 'win32':
             raises(ValueError, signal, 42, lambda *args: None)
+            raises(ValueError, signal, 7, lambda *args: None)
             signal(42, lambda *args: None)
             signal(42, SIG_DFL)