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 |
|
|
67 | 68 |
|
|
68 | 69 |
|
|
69 | 70 |
|
|
70 |
|
|
|
71 | """, | |
|
72 | """\ | |
|
71 | 73 |
|
|
72 | 74 |
|
|
73 | 75 |
|
|
74 | 76 |
|
|
75 |
|
|
|
77 | """, | |
|
78 | ) | |
|
76 | 79 | |
|
77 |
IPYTHON_PROMPT_VI_NAV = ( |
|
|
80 | IPYTHON_PROMPT_VI_NAV = ( | |
|
81 | """\ | |
|
78 | 82 |
|
|
79 | 83 |
|
|
80 | 84 |
|
|
81 | 85 |
|
|
82 |
|
|
|
86 | """, | |
|
87 | """\ | |
|
83 | 88 |
|
|
84 | 89 |
|
|
85 | 90 |
|
|
86 | 91 |
|
|
87 |
|
|
|
92 | """, | |
|
93 | ) | |
|
88 | 94 | |
|
89 | 95 | |
|
90 | 96 | def test_ipython_prompt(): |
|
91 |
for sample, expected in [ |
|
|
92 | IPYTHON_PROMPT_VI_INS, IPYTHON_PROMPT_VI_NAV]: | |
|
93 | nt.assert_equal(ipt2.ipython_prompt(sample.splitlines(keepends=True)), | |
|
94 | expected.splitlines(keepends=True)) | |
|
97 | for sample, expected in [ | |
|
98 | IPYTHON_PROMPT, | |
|
99 | IPYTHON_PROMPT_L2, | |
|
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 | 109 | INDENT_SPACES = ("""\ |
General Comments 0
You need to be logged in to leave comments.
Login now