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)
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