##// END OF EJS Templates
test exit code with csh...
MinRK -
Show More
@@ -25,9 +25,12 b' from os.path import join'
25 import nose.tools as nt
25 import nose.tools as nt
26
26
27 from IPython.core.inputtransformer import InputTransformer
27 from IPython.core.inputtransformer import InputTransformer
28 from IPython.testing.decorators import skipif, skip_win32, onlyif_unicode_paths
28 from IPython.testing.decorators import (
29 skipif, skip_win32, onlyif_unicode_paths, onlyif_cmds_exist,
30 )
29 from IPython.testing import tools as tt
31 from IPython.testing import tools as tt
30 from IPython.utils import io
32 from IPython.utils import io
33 from IPython.utils.process import find_cmd
31 from IPython.utils import py3compat
34 from IPython.utils import py3compat
32 from IPython.utils.py3compat import unicode_type, PY3
35 from IPython.utils.py3compat import unicode_type, PY3
33
36
@@ -445,6 +448,18 b' class ExitCodeChecks(tt.TempFileMixin):'
445 self.system("%s %s" % (sys.executable, self.fname))
448 self.system("%s %s" % (sys.executable, self.fname))
446 self.assertEqual(ip.user_ns['_exit_code'], -signal.SIGALRM)
449 self.assertEqual(ip.user_ns['_exit_code'], -signal.SIGALRM)
447
450
451 @onlyif_cmds_exist("csh")
452 def test_exit_code_signal_csh(self):
453 SHELL = os.environ.get('SHELL', None)
454 os.environ['SHELL'] = find_cmd("csh")
455 try:
456 self.test_exit_code_signal()
457 finally:
458 if SHELL is not None:
459 os.environ['SHELL'] = SHELL
460 else:
461 del os.environ['SHELL']
462
448 class TestSystemRaw(unittest.TestCase, ExitCodeChecks):
463 class TestSystemRaw(unittest.TestCase, ExitCodeChecks):
449 system = ip.system_raw
464 system = ip.system_raw
450
465
General Comments 0
You need to be logged in to leave comments. Login now