##// END OF EJS Templates
[utils][tests][process] Remove nose
Samuel Gaist -
Show More
@@ -20,9 +20,8 b' import os'
20 20 import time
21 21 from _thread import interrupt_main # Py 3
22 22 import threading
23 from unittest import SkipTest
24 23
25 import nose.tools as nt
24 import pytest
26 25
27 26 from IPython.utils.process import (find_cmd, FindCmdError, arg_split,
28 27 system, getoutput, getoutputerror,
@@ -41,8 +40,8 b' python = os.path.basename(sys.executable)'
41 40 @dec.skip_win32
42 41 def test_find_cmd_ls():
43 42 """Make sure we can find the full path to ls."""
44 path = find_cmd('ls')
45 nt.assert_true(path.endswith('ls'))
43 path = find_cmd("ls")
44 assert path.endswith("ls")
46 45
47 46
48 47 def has_pywin32():
@@ -64,7 +63,7 b' def test_find_cmd_pythonw():'
64 63 "This test runs on posix or in win32 with win32api installed")
65 64 def test_find_cmd_fail():
66 65 """Make sure that FindCmdError is raised if we can't find the cmd."""
67 nt.assert_raises(FindCmdError,find_cmd,'asdfasdf')
66 pytest.raises(FindCmdError, find_cmd, "asdfasdf")
68 67
69 68
70 69 # TODO: move to pytest.mark.parametrize once nose gone
@@ -121,7 +120,7 b' class SubProcessTestCase(tt.TempFileMixin):'
121 120 Interrupt a subprocess after a second.
122 121 """
123 122 if threading.main_thread() != threading.current_thread():
124 raise nt.SkipTest("Can't run this test if not in main thread.")
123 raise pytest.skip("Can't run this test if not in main thread.")
125 124
126 125 # Some tests can overwrite SIGINT handler (by using pdb for example),
127 126 # which then breaks this test, so just make sure it's operating
General Comments 0
You need to be logged in to leave comments. Login now