Skip to content

Commit 5864a35

Browse files
Import 'spwan_repl' from test_reply.py
1 parent cdccdea commit 5864a35

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

Lib/test/test_pdb.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4345,22 +4345,6 @@ def test_quit(self):
43454345
self.assertEqual(stdout.count(QUIT_PROMPT_QUESTION), 2)
43464346

43474347

4348-
def spawn_repl():
4349-
"""Run the basic Python REPL. Returns a Popen object."""
4350-
# This function is based on the function "spawn_repl" in test_repl.py.
4351-
# See comments there for the rationale for the command line args.
4352-
stdin_fname = os.path.join(os.path.dirname(sys.executable), '<stdin>')
4353-
proc = subprocess.Popen(
4354-
[stdin_fname, '-I', '-i'],
4355-
executable=sys.executable,
4356-
text=True,
4357-
stdin=subprocess.PIPE,
4358-
stdout=subprocess.PIPE,
4359-
stderr=subprocess.STDOUT,
4360-
)
4361-
return proc
4362-
4363-
43644348
@support.force_not_colorized_test_class
43654349
@support.requires_subprocess()
43664350
class TestREPLSession(unittest.TestCase):
@@ -4373,6 +4357,7 @@ def test_return_from_inline_mode_to_REPL(self):
43734357
pdb.set_trace(commands=['x * 3', 'q'])
43744358
x[::-1] * 3
43754359
"""
4360+
from test.test_repl import spawn_repl
43764361
p = spawn_repl()
43774362
p.stdin.write(textwrap.dedent(user_input))
43784363
output = kill_python(p)

0 commit comments

Comments
 (0)