コード例 #1
0
 def test_shutdown_handler(self):
     with patch('sys.exit') as exit:
         _shutdown_cleanup(15, Mock())
         self.assertTrue(exit.called)
         self.assertEqual(os.WTERMSIG(exit.call_args[0][0]), 15)
コード例 #2
0
ファイル: test_common.py プロジェクト: celery/billiard
 def test_shutdown_handler(self):
     with patch('sys.exit') as exit:
         _shutdown_cleanup(15, Mock())
         exit.assert_called()
         assert os.WTERMSIG(exit.call_args[0][0]) == 15
コード例 #3
0
 def test_shutdown_handler(self):
     with patch('sys.exit') as exit:
         _shutdown_cleanup(15, Mock())
         self.assertTrue(exit.called)
         self.assertEqual(os.WTERMSIG(exit.call_args[0][0]), 15)
コード例 #4
0
 def test_shutdown_handler(self):
     with patch('sys.exit') as exit:
         _shutdown_cleanup(15, Mock())
         exit.assert_called()
         assert os.WTERMSIG(exit.call_args[0][0]) == 15