Example #1
0
  def test_hard_exit_handler(self):
    with mock.patch('os._exit', **PATCH_OPTS) as mock_exit:
      with hard_exit_handler():
        raise HardSystemExit()

    mock_exit.assert_called_once_with(0)
Example #2
0
    def test_hard_exit_handler(self):
        with mock.patch('os._exit', **PATCH_OPTS) as mock_exit:
            with hard_exit_handler():
                raise HardSystemExit()

        mock_exit.assert_called_once_with(0)
Example #3
0
 def run(self):
   with hard_exit_handler(), maybe_profiled(self._profile_path):
     self._run()
Example #4
0
 def run(self):
     profile_path = self._env.get('PANTS_PROFILE')
     with hard_exit_handler(), maybe_profiled(profile_path):
         self._run()
 def run(self):
   profile_path = self._env.get('PANTS_PROFILE')
   with hard_exit_handler(), maybe_profiled(profile_path):
     self._run()