コード例 #1
0
ファイル: test_contextutil.py プロジェクト: benjyw/pants
  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)
コード例 #2
0
ファイル: test_contextutil.py プロジェクト: ttreptow/pants
    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)
コード例 #3
0
 def run(self):
   with hard_exit_handler(), maybe_profiled(self._profile_path):
     self._run()
コード例 #4
0
 def run(self):
     profile_path = self._env.get('PANTS_PROFILE')
     with hard_exit_handler(), maybe_profiled(profile_path):
         self._run()
コード例 #5
0
 def run(self):
   profile_path = self._env.get('PANTS_PROFILE')
   with hard_exit_handler(), maybe_profiled(profile_path):
     self._run()