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

View file

@ -143,6 +143,9 @@ def test_dash_c_loader(self):
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")