def test_lookup_signame_signum(self):
     for signum in range(signal.NSIG):
         signame = Msig.lookup_signame(signum)
         if signame is not None:
             self.assertEqual(signum, Msig.lookup_signum(signame))
             # Try without the SIG prefix
             self.assertEqual(signum, Msig.lookup_signum(signame[3:]))
             pass
         pass
     return
Exemple #2
0
 def test_lookup_signame_signum(self):
     for signum in range(signal.NSIG):
         signame = Msig.lookup_signame(signum)
         if signame is not None:
             self.assertEqual(signum, Msig.lookup_signum(signame))
             # Try without the SIG prefix
             self.assertEqual(signum, Msig.lookup_signum(signame[3:]))
             pass
         pass
     return
Exemple #3
0
 def test_lookup_signame_signum(self):
     ignore = ['ITIMER_VIRTUAL', 'ITIMER_REAL', 'ITIMER_PROF']
     for signum in range(signal.NSIG):
         signame = Msig.lookup_signame(signum)
         if signame is not None and signame not in ignore:
             self.assertEqual(signum, Msig.lookup_signum(signame),
                              "looking up name %s" % signame)
             # Try without the SIG prefix
             self.assertEqual(signum, Msig.lookup_signum(signame[3:]))
             pass
         pass
     return
 def test_lookup_signame(self):
     for expect, num in (('SIGTERM', 15), ('SIGTERM', -15),
                       (None, 300)):
         self.assertEqual(expect, Msig.lookup_signame(num))
         pass
     return
Exemple #5
0
 def test_lookup_signame(self):
     for expect, num in (('SIGTERM', 15), ('SIGTERM', -15), (None, 300)):
         self.assertEqual(expect, Msig.lookup_signame(num))
         pass
     return