mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	[3.13] gh-123228: fix return type for _ReadlineWrapper.get_line_buffer() (GH-123281) (#123293)
gh-123228: fix return type for _ReadlineWrapper.get_line_buffer() (GH-123281)
(cherry picked from commit ca18ff2a34)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
			
			
This commit is contained in:
		
							parent
							
								
									a65fe07db4
								
							
						
					
					
						commit
						31fae8c94f
					
				
					 3 changed files with 13 additions and 5 deletions
				
			
		|  | @ -26,7 +26,8 @@ | |||
|     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 @@ def test_basic(self): | |||
|         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
	
	 Miss Islington (bot)
						Miss Islington (bot)