mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-123228: fix return type for _ReadlineWrapper.get_line_buffer() (#123281)
Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
This commit is contained in:
parent
c4ee4e756a
commit
ca18ff2a34
3 changed files with 13 additions and 5 deletions
|
@ -26,7 +26,8 @@ from .support import (
|
|||
make_clean_env,
|
||||
)
|
||||
from _pyrepl.console import Event
|
||||
from _pyrepl.readline import ReadlineAlikeReader, ReadlineConfig
|
||||
from _pyrepl.readline import (ReadlineAlikeReader, ReadlineConfig,
|
||||
_ReadlineWrapper)
|
||||
from _pyrepl.readline import multiline_input as readline_multiline_input
|
||||
|
||||
try:
|
||||
|
@ -516,6 +517,11 @@ class TestPyReplOutput(TestCase):
|
|||
self.assertEqual(output, "1+1")
|
||||
self.assertEqual(clean_screen(reader.screen), "1+1")
|
||||
|
||||
def test_get_line_buffer_returns_str(self):
|
||||
reader = self.prepare_reader(code_to_events("\n"))
|
||||
wrapper = _ReadlineWrapper(reader=reader)
|
||||
self.assertIs(type(wrapper.get_line_buffer()), str)
|
||||
|
||||
def test_multiline_edit(self):
|
||||
events = itertools.chain(
|
||||
code_to_events("def f():\n...\n\n"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue