diff options
Diffstat (limited to 'Lib/test/test_pty.py')
-rw-r--r-- | Lib/test/test_pty.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py index ef95268e19..db370391f7 100644 --- a/Lib/test/test_pty.py +++ b/Lib/test/test_pty.py @@ -196,6 +196,12 @@ class PtyTest(unittest.TestCase): # pty.fork() passed. + def test_spawn_returns_status(self): + status = pty.spawn([sys.executable, '-c', 'import sys; sys.exit(0)']) + self.assertEqual(status, 0) + status = pty.spawn([sys.executable, '-c', 'import sys; sys.exit(5)']) + self.assertEqual(status, 5 << 8) + class SmallPtyTests(unittest.TestCase): """These tests don't spawn children or hang.""" |