소스 검색

Fix test failure on systems where SIGCHLD = SIGCLD

Mike Naberezny 11 년 전
부모
커밋
b1df058b8b
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      supervisor/tests/test_supervisord.py

+ 5 - 2
supervisor/tests/test_supervisord.py

@@ -177,8 +177,11 @@ class SupervisordTests(unittest.TestCase):
         supervisord = self._makeOne(options)
         supervisord.handle_signal()
         self.assertEqual(supervisord.options.mood, 1)
-        self.assertEqual(options.logger.data[0],
-                         'received SIGCHLD indicating a child quit')
+        # supervisor.options.signame(signal.SIGCHLD) may return "SIGCLD"
+        # on linux or other systems where SIGCHLD = SIGCLD.
+        msgs = ('received SIGCHLD indicating a child quit',
+                'received SIGCLD indicating a child quit')
+        self.assertTrue(options.logger.data[0] in msgs)
 
     def test_handle_sigusr2(self):
         options = DummyOptions()