Note why we can't write an automated test for the code path that brings up the REPL for a bare 'python' call

This commit is contained in:
Nick Coghlan 2012-07-15 18:24:42 +10:00
parent 85e729ec3b
commit 37b3b90b02
1 changed files with 3 additions and 0 deletions

View File

@ -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")