##// END OF EJS Templates
remove nose tools from test_editorhooks
Matthias Bussonnier -
Show More
@@ -2,8 +2,6 b''
2 2 import sys
3 3 from unittest import mock
4 4
5 import nose.tools as nt
6
7 5 from IPython import get_ipython
8 6 from IPython.lib import editorhooks
9 7
@@ -20,15 +18,15 b' def test_install_editor():'
20 18 with mock.patch('subprocess.Popen', fake_popen):
21 19 get_ipython().hooks.editor('the file', 64)
22 20
23 nt.assert_equal(len(called), 1)
24 args = called[0]['args']
25 kwargs = called[0]['kwargs']
21 assert len(called) == 1
22 args = called[0]["args"]
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'):
30 expected = ['foo', '-l', '64', '-f', 'the file']
27 if sys.platform.startswith("win"):
28 expected = ["foo", "-l", "64", "-f", "the file"]
31 29 else:
32 30 expected = "foo -l 64 -f 'the file'"
33 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