From: Nick Coghlan Date: Sun, 15 Jul 2012 08:24:42 +0000 (+1000) Subject: Note why we can't write an automated test for the code path that brings up the REPL... X-Git-Tag: v3.3.0b2~208 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37b3b90b02183d072b1f4fa4de96f67eafb6f245;p=python Note why we can't write an automated test for the code path that brings up the REPL for a bare 'python' call --- diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py index a08cabd2cb..849abe2477 100644 --- a/Lib/test/test_cmd_line_script.py +++ b/Lib/test/test_cmd_line_script.py @@ -143,6 +143,9 @@ class CmdLineTest(unittest.TestCase): self.assertIn(expected, out) def test_stdin_loader(self): + # Unfortunately, there's no way to automatically test the fully + # interactive REPL, since that code path only gets executed when + # stdin in an interactive tty. p = spawn_python() try: p.stdin.write(b"print(__loader__)\n")