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 |
@@ -123,4 +151,4 b' CRLF_MAGIC = ([' | |||
|
123 | 151 | |
|
124 | 152 | def test_crlf_magic(): |
|
125 | 153 | for sample, expected in [CRLF_MAGIC]: |
|
126 | nt.assert_equal(ipt2.cell_magic(sample), expected) No newline at end of file | |
|
154 | nt.assert_equal(ipt2.cell_magic(sample), expected) |
General Comments 0
You need to be logged in to leave comments.
Login now