Show More
@@ -62,36 +62,48 b' for a in range(5):' | |||||
62 | """) |
|
62 | """) | |
63 |
|
63 | |||
64 |
|
64 | |||
65 |
IPYTHON_PROMPT_VI_INS = ( |
|
65 | IPYTHON_PROMPT_VI_INS = ( | |
|
66 | """\ | |||
66 |
|
|
67 | [ins] In [11]: def a(): | |
67 |
|
|
68 | ...: 123 | |
68 |
|
|
69 | ...: | |
69 |
|
|
70 | ...: 123 | |
70 |
|
|
71 | """, | |
|
72 | """\ | |||
71 |
|
|
73 | def a(): | |
72 |
|
|
74 | 123 | |
73 |
|
|
75 | ||
74 |
|
|
76 | 123 | |
75 |
|
|
77 | """, | |
|
78 | ) | |||
76 |
|
79 | |||
77 |
IPYTHON_PROMPT_VI_NAV = ( |
|
80 | IPYTHON_PROMPT_VI_NAV = ( | |
|
81 | """\ | |||
78 |
|
|
82 | [nav] In [11]: def a(): | |
79 |
|
|
83 | ...: 123 | |
80 |
|
|
84 | ...: | |
81 |
|
|
85 | ...: 123 | |
82 |
|
|
86 | """, | |
|
87 | """\ | |||
83 |
|
|
88 | def a(): | |
84 |
|
|
89 | 123 | |
85 |
|
|
90 | ||
86 |
|
|
91 | 123 | |
87 |
|
|
92 | """, | |
|
93 | ) | |||
88 |
|
94 | |||
89 |
|
95 | |||
90 | def test_ipython_prompt(): |
|
96 | def test_ipython_prompt(): | |
91 |
for sample, expected in [ |
|
97 | for sample, expected in [ | |
92 | IPYTHON_PROMPT_VI_INS, IPYTHON_PROMPT_VI_NAV]: |
|
98 | IPYTHON_PROMPT, | |
93 | nt.assert_equal(ipt2.ipython_prompt(sample.splitlines(keepends=True)), |
|
99 | IPYTHON_PROMPT_L2, | |
94 | expected.splitlines(keepends=True)) |
|
100 | IPYTHON_PROMPT_VI_INS, | |
|
101 | IPYTHON_PROMPT_VI_NAV, | |||
|
102 | ]: | |||
|
103 | nt.assert_equal( | |||
|
104 | ipt2.ipython_prompt(sample.splitlines(keepends=True)), | |||
|
105 | expected.splitlines(keepends=True), | |||
|
106 | ) | |||
95 |
|
107 | |||
96 |
|
108 | |||
97 | INDENT_SPACES = ("""\ |
|
109 | INDENT_SPACES = ("""\ |
General Comments 0
You need to be logged in to leave comments.
Login now