Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use a single multi-line string input
  • Loading branch information
gaogaotiantian committed Feb 22, 2025
commit 41e37ecaecf21a02f7ba2bd19630ce787143736a
22 changes: 12 additions & 10 deletions Lib/test/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -4449,16 +4449,18 @@ def test_multiline_indent_completion(self):
# \t should always complete a 4-space indent
# This piece of code will raise an IndentationError or a SyntaxError
# if the completion is not working as expected
input = b"def func():\n"
input += b"\ta = 1\n"
input += b" \ta += 1\n"
input += b" \ta += 1\n"
input += b" \tif a > 0:\n"
input += b" a += 1\n"
input += b"\t\treturn a\n"
input += b"\n"
input += b"func()\n"
input += b"c\n"
input = textwrap.dedent("""\
def func():
\ta = 1
\ta += 1
\ta += 1
\tif a > 0:
a += 1
\t\treturn a

func()
c
""").encode()

output = run_pty(script, input)

Expand Down