~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_breakin.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-05-24 20:07:12 UTC
  • mfrom: (5901.1.2 bzr.dev-good)
  • Revision ID: pqm@pqm.ubuntu.com-20110524200712-z0ay7c4lsbg1x7qs
(jam) Tell bzr.dev that we really do want mgz's changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    def setUp(self):
43
43
        super(TestBreakin, self).setUp()
44
44
        self.requireFeature(tests.BreakinFeature)
45
 
        if sys.platform == 'win32':
46
 
            self._send_signal = self._send_signal_win32
47
 
        else:
48
 
            self._send_signal = self._send_signal_via_kill
49
45
 
50
46
    def _send_signal_via_kill(self, pid, sig_type):
51
47
        if sig_type == 'break':
89
85
            exit_code = breakin.determine_signal()
90
86
            ctypes.windll.kernel32.TerminateProcess(pid, exit_code)
91
87
 
 
88
    if sys.platform == 'win32':
 
89
        _send_signal = _send_signal_win32
 
90
    else:
 
91
        _send_signal = _send_signal_via_kill
 
92
 
92
93
    def _popen(self, *args, **kwargs):
93
94
        if sys.platform == 'win32':
94
95
            CREATE_NEW_PROCESS_GROUP = 512