]> granicus.if.org Git - python/commitdiff
Fix sporadic test_subprocess regression introduced by 834650d63130.
authorRoss Lagerwall <rosslagerwall@gmail.com>
Wed, 22 Feb 2012 04:02:07 +0000 (06:02 +0200)
committerRoss Lagerwall <rosslagerwall@gmail.com>
Wed, 22 Feb 2012 04:02:07 +0000 (06:02 +0200)
Lib/test/test_subprocess.py

index 5deec426db73b48846cc73fa1d9ca88f3b7fd840..e3462d91e458d6ad7dc8892176e0aabf7acc19b5 100644 (file)
@@ -688,8 +688,8 @@ class ProcessTestCase(BaseTestCase):
 
     def test_poll(self):
         p = subprocess.Popen([sys.executable, "-c",
-                              "import os",
-                              "os.read(1)"], stdin=subprocess.PIPE)
+                              "import os; os.read(0, 1)"],
+                             stdin=subprocess.PIPE)
         self.addCleanup(p.stdin.close)
         self.assertIsNone(p.poll())
         os.write(p.stdin.fileno(), b'A')