##// END OF EJS Templates
Reformat test code
Blazej Michalik -
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 [ins] In [11]: def a():
67 [ins] In [11]: def a():
67 ...: 123
68 ...: 123
68 ...:
69 ...:
69 ...: 123
70 ...: 123
70 """, """\
71 """,
72 """\
71 def a():
73 def a():
72 123
74 123
73
75
74 123
76 123
75 """)
77 """,
78 )
76
79
77 IPYTHON_PROMPT_VI_NAV = ("""\
80 IPYTHON_PROMPT_VI_NAV = (
81 """\
78 [nav] In [11]: def a():
82 [nav] In [11]: def a():
79 ...: 123
83 ...: 123
80 ...:
84 ...:
81 ...: 123
85 ...: 123
82 """, """\
86 """,
87 """\
83 def a():
88 def a():
84 123
89 123
85
90
86 123
91 123
87 """)
92 """,
93 )
88
94
89
95
90 def test_ipython_prompt():
96 def test_ipython_prompt():
91 for sample, expected in [IPYTHON_PROMPT, IPYTHON_PROMPT_L2,
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