|
11 | 11 | from .support import prepare_reader, prepare_console |
12 | 12 | from _pyrepl.console import Event |
13 | 13 | from _pyrepl.reader import Reader |
14 | | -from _pyrepl.utils import DEFAULT_PS1, DEFAULT_PS2, DEFAULT_PS3, DEFAULT_PS4 |
| 14 | +from _pyrepl.utils import DEFAULT_PS1 |
| 15 | +from _pyrepl.utils import MULTILINE_PS1, MULTILINE_PS2, MULTILINE_PS3, MULTILINE_PS4 |
15 | 16 | from _colorize import default_theme |
16 | 17 |
|
17 | 18 |
|
18 | 19 | def prepare_reader_with_prompt( |
19 | | - console, ps1=DEFAULT_PS1, ps2=DEFAULT_PS2, ps3=DEFAULT_PS3, ps4=DEFAULT_PS4): |
| 20 | + console, ps1=MULTILINE_PS1, ps2=MULTILINE_PS2, ps3=MULTILINE_PS3, ps4=MULTILINE_PS4): |
20 | 21 | reader = prepare_reader( |
21 | 22 | console, |
22 | 23 | can_colorize=False, |
@@ -57,10 +58,10 @@ def test_calc_screen_prompt_handling(self): |
57 | 58 | def prepare_reader_keep_prompts(*args, **kwargs): |
58 | 59 | reader = prepare_reader(*args, **kwargs) |
59 | 60 | del reader.get_prompt |
60 | | - reader.ps1 = ">>> " |
61 | | - reader.ps2 = ">>> " |
62 | | - reader.ps3 = "... " |
63 | | - reader.ps4 = "" |
| 61 | + reader.ps1 = MULTILINE_PS1 |
| 62 | + reader.ps2 = MULTILINE_PS2 |
| 63 | + reader.ps3 = MULTILINE_PS3 |
| 64 | + reader.ps4 = MULTILINE_PS4 |
64 | 65 | reader.can_colorize = False |
65 | 66 | reader.paste_mode = False |
66 | 67 | return reader |
@@ -355,13 +356,13 @@ def __str__(self): 1/0 |
355 | 356 | ) |
356 | 357 |
|
357 | 358 | prompt = reader.get_prompt(0, False) |
358 | | - self.assertEqual(prompt, DEFAULT_PS2) |
| 359 | + self.assertEqual(prompt, MULTILINE_PS2) |
359 | 360 |
|
360 | 361 | prompt = reader.get_prompt(1, False) |
361 | | - self.assertEqual(prompt, DEFAULT_PS3) |
| 362 | + self.assertEqual(prompt, MULTILINE_PS3) |
362 | 363 |
|
363 | 364 | prompt = reader.get_prompt(2, False) |
364 | | - self.assertEqual(prompt, DEFAULT_PS4) |
| 365 | + self.assertEqual(prompt, MULTILINE_PS4) |
365 | 366 |
|
366 | 367 | def test_prompt_arg_raise_exception(self): |
367 | 368 | # Handles exceptions from arg prompt |
|
0 commit comments