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

Method test_exit_code_signal

tests/test_interactiveshell.py:655–662  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

653
654 @skipif(not hasattr(signal, "SIGALRM"))
655 def test_exit_code_signal(self):
656 self.mktmp(
657 "import signal, time\n"
658 "signal.setitimer(signal.ITIMER_REAL, 0.1)\n"
659 "time.sleep(1)\n"
660 )
661 self.system("%s %s" % (shlex.quote(sys.executable), shlex.quote(self.fname)))
662 self.assertEqual(ip.user_ns["_exit_code"], -signal.SIGALRM)
663
664 @onlyif_cmds_exist("csh")
665 def test_exit_code_signal_csh(self): # pragma: no cover

Callers 2

test_exit_code_signalMethod · 0.45

Calls 2

mktmpMethod · 0.80
systemMethod · 0.80

Tested by

no test coverage detected