Skip to content

Commit 41e37ec

Browse files
Use a single multi-line string input
1 parent 9293b21 commit 41e37ec

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

Lib/test/test_pdb.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4449,16 +4449,18 @@ def test_multiline_indent_completion(self):
44494449
# \t should always complete a 4-space indent
44504450
# This piece of code will raise an IndentationError or a SyntaxError
44514451
# if the completion is not working as expected
4452-
input = b"def func():\n"
4453-
input += b"\ta = 1\n"
4454-
input += b" \ta += 1\n"
4455-
input += b" \ta += 1\n"
4456-
input += b" \tif a > 0:\n"
4457-
input += b" a += 1\n"
4458-
input += b"\t\treturn a\n"
4459-
input += b"\n"
4460-
input += b"func()\n"
4461-
input += b"c\n"
4452+
input = textwrap.dedent("""\
4453+
def func():
4454+
\ta = 1
4455+
\ta += 1
4456+
\ta += 1
4457+
\tif a > 0:
4458+
a += 1
4459+
\t\treturn a
4460+
4461+
func()
4462+
c
4463+
""").encode()
44624464

44634465
output = run_pty(script, input)
44644466

0 commit comments

Comments
 (0)