##// END OF EJS Templates
remove nose tools from test_editorhooks
Matthias Bussonnier -
Show More
@@ -2,8 +2,6 b''
2 import sys
2 import sys
3 from unittest import mock
3 from unittest import mock
4
4
5 import nose.tools as nt
6
7 from IPython import get_ipython
5 from IPython import get_ipython
8 from IPython.lib import editorhooks
6 from IPython.lib import editorhooks
9
7
@@ -20,15 +18,15 b' def test_install_editor():'
20 with mock.patch('subprocess.Popen', fake_popen):
18 with mock.patch('subprocess.Popen', fake_popen):
21 get_ipython().hooks.editor('the file', 64)
19 get_ipython().hooks.editor('the file', 64)
22
20
23 nt.assert_equal(len(called), 1)
21 assert len(called) == 1
24 args = called[0]['args']
22 args = called[0]["args"]
25 kwargs = called[0]['kwargs']
23 kwargs = called[0]["kwargs"]
26
24
27 nt.assert_equal(kwargs, {'shell': True})
25 assert kwargs == {"shell": True}
28
26
29 if sys.platform.startswith('win'):
27 if sys.platform.startswith("win"):
30 expected = ['foo', '-l', '64', '-f', 'the file']
28 expected = ["foo", "-l", "64", "-f", "the file"]
31 else:
29 else:
32 expected = "foo -l 64 -f 'the file'"
30 expected = "foo -l 64 -f 'the file'"
33 cmd = args[0]
31 cmd = args[0]
34 nt.assert_equal(cmd, expected)
32 assert cmd == expected
General Comments 0
You need to be logged in to leave comments. Login now