##// END OF EJS Templates
[core][tests][splitinput] Remove nose
Samuel Gaist -
Show More
@@ -1,38 +1,38 b''
1 1 # coding: utf-8
2 import nose.tools as nt
3 2
4 3 from IPython.core.splitinput import split_user_input, LineInfo
5 4 from IPython.testing import tools as tt
6 5
7 6 tests = [
8 ('x=1', ('', '', 'x', '=1')),
9 ('?', ('', '?', '', '')),
10 ('??', ('', '??', '', '')),
11 (' ?', (' ', '?', '', '')),
12 (' ??', (' ', '??', '', '')),
13 ('??x', ('', '??', 'x', '')),
14 ('?x=1', ('', '?', 'x', '=1')),
15 ('!ls', ('', '!', 'ls', '')),
16 (' !ls', (' ', '!', 'ls', '')),
17 ('!!ls', ('', '!!', 'ls', '')),
18 (' !!ls', (' ', '!!', 'ls', '')),
19 (',ls', ('', ',', 'ls', '')),
20 (';ls', ('', ';', 'ls', '')),
21 (' ;ls', (' ', ';', 'ls', '')),
22 ('f.g(x)', ('', '', 'f.g', '(x)')),
23 ('f.g (x)', ('', '', 'f.g', '(x)')),
24 ('?%hist1', ('', '?', '%hist1', '')),
25 ('?%%hist2', ('', '?', '%%hist2', '')),
26 ('??%hist3', ('', '??', '%hist3', '')),
27 ('??%%hist4', ('', '??', '%%hist4', '')),
28 ('?x*', ('', '?', 'x*', '')),
29 ]
30 tests.append((u"Pérez Fernando", (u'', u'', u'Pérez', u'Fernando')))
7 ("x=1", ("", "", "x", "=1")),
8 ("?", ("", "?", "", "")),
9 ("??", ("", "??", "", "")),
10 (" ?", (" ", "?", "", "")),
11 (" ??", (" ", "??", "", "")),
12 ("??x", ("", "??", "x", "")),
13 ("?x=1", ("", "?", "x", "=1")),
14 ("!ls", ("", "!", "ls", "")),
15 (" !ls", (" ", "!", "ls", "")),
16 ("!!ls", ("", "!!", "ls", "")),
17 (" !!ls", (" ", "!!", "ls", "")),
18 (",ls", ("", ",", "ls", "")),
19 (";ls", ("", ";", "ls", "")),
20 (" ;ls", (" ", ";", "ls", "")),
21 ("f.g(x)", ("", "", "f.g", "(x)")),
22 ("f.g (x)", ("", "", "f.g", "(x)")),
23 ("?%hist1", ("", "?", "%hist1", "")),
24 ("?%%hist2", ("", "?", "%%hist2", "")),
25 ("??%hist3", ("", "??", "%hist3", "")),
26 ("??%%hist4", ("", "??", "%%hist4", "")),
27 ("?x*", ("", "?", "x*", "")),
28 ]
29 tests.append(("Pérez Fernando", ("", "", "Pérez", "Fernando")))
30
31 31
32 32 def test_split_user_input():
33 33 return tt.check_pairs(split_user_input, tests)
34 34
35 35 def test_LineInfo():
36 36 """Simple test for LineInfo construction and str()"""
37 linfo = LineInfo(' %cd /home')
38 nt.assert_equal(str(linfo), 'LineInfo [ |%|cd|/home]')
37 linfo = LineInfo(" %cd /home")
38 assert str(linfo) == "LineInfo [ |%|cd|/home]"
General Comments 0
You need to be logged in to leave comments. Login now