MCPcopy Index your code
hub / github.com/ipython/ipython / test_system_interrupt

Method test_system_interrupt

tests/test_process.py:189–201  ·  view source on GitHub ↗

When interrupted in the way ipykernel interrupts IPython, the subprocess is interrupted.

(self)

Source from the content-addressed store, hash-verified

187 return result
188
189 def test_system_interrupt(self):
190 """
191 When interrupted in the way ipykernel interrupts IPython, the
192 subprocess is interrupted.
193 """
194
195 def command():
196 return system('%s -c "import time; time.sleep(5)"' % python)
197
198 status = self.assert_interrupts(command)
199 self.assertNotEqual(
200 status, 0, f"The process wasn't interrupted. Status: {status}"
201 )
202
203 def test_getoutput(self):
204 out = getoutput(f'{python} "{self.fname}"')

Callers

nothing calls this directly

Calls 1

assert_interruptsMethod · 0.95

Tested by

no test coverage detected