##// END OF EJS Templates
Test for vi-prompt strip
Blazej Michalik -
Show More
@@ -61,11 +61,39 b' for a in range(5):'
61 61 print(a ** 2)
62 62 """)
63 63
64
65 IPYTHON_PROMPT_VI_INS = ("""\
66 [ins] In [11]: def a():
67 ...: 123
68 ...:
69 ...: 123
70 """, """\
71 def a():
72 123
73
74 123
75 """)
76
77 IPYTHON_PROMPT_VI_NAV = ("""\
78 [nav] In [11]: def a():
79 ...: 123
80 ...:
81 ...: 123
82 """, """\
83 def a():
84 123
85
86 123
87 """)
88
89
64 90 def test_ipython_prompt():
65 for sample, expected in [IPYTHON_PROMPT, IPYTHON_PROMPT_L2]:
91 for sample, expected in [IPYTHON_PROMPT, IPYTHON_PROMPT_L2,
92 IPYTHON_PROMPT_VI_INS, IPYTHON_PROMPT_VI_NAV]:
66 93 nt.assert_equal(ipt2.ipython_prompt(sample.splitlines(keepends=True)),
67 94 expected.splitlines(keepends=True))
68 95
96
69 97 INDENT_SPACES = ("""\
70 98 if True:
71 99 a = 3
General Comments 0
You need to be logged in to leave comments. Login now