Skip to content

Commit

Permalink
add broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FullteaR committed Jan 5, 2025
1 parent 2d82518 commit 2822d74
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Lib/_pyrepl/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,14 @@ def calc_screen(self) -> list[str]:
prompt = ""
else:
prompt = self.get_prompt(ln, ll >= pos >= 0)
trace("prompt = " + str(prompt))
trace("screen before while loop = " + str(screen))
while "\n" in prompt:
pre_prompt, _, prompt = prompt.partition("\n")
last_refresh_line_end_offsets.append(offset)
screen.append(pre_prompt)
screeninfo.append((0, []))
trace("screen after while loop = " + str(screen))
pos -= ll + 1
prompt, lp = self.process_prompt(prompt)
l, l2 = disp_str(line)
Expand Down
3 changes: 3 additions & 0 deletions Lib/test/test_pyrepl/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,6 @@ def test_key_press_on_tab_press_once(self):
reader, _ = handle_all_events(events, prepare_reader=completing_reader)

self.assert_screen_equals(reader, f"{code}a")

def test_tmp(self):
self.assertListEqual([1], [2])

0 comments on commit 2822d74

Please sign in to comment.