Author: Brian Kearns <bdkea...@gmail.com>
Branch: 
Changeset: r60947:100529d2dbf1
Date: 2013-02-07 19:56 -0500
http://bitbucket.org/pypy/pypy/changeset/100529d2dbf1/

Log:    fix this test on windows

diff --git a/pypy/module/posix/test/test_posix2.py 
b/pypy/module/posix/test/test_posix2.py
--- a/pypy/module/posix/test/test_posix2.py
+++ b/pypy/module/posix/test/test_posix2.py
@@ -514,12 +514,14 @@
             assert res == '1\n'
 
     def test_popen_child_fds(self):
-        os = self.posix
-        from os.path import join
-        with open(join(self.pdir, 'file1'), 'r') as fd:
-            with os.popen('%s -c "import os; print os.read(%d, 10)"' % 
(self.python, fd.fileno())) as stream:
+        import os
+        with open(os.path.join(self.pdir, 'file1'), 'r') as fd:
+            with self.posix.popen('%s -c "import os; print os.read(%d, 10)" 
2>&1' % (self.python, fd.fileno())) as stream:
                 res = stream.read()
-                assert res == 'test1\n'
+                if os.name == 'nt':
+                    assert '\nOSError: [Errno 9]' in res
+                else:
+                    assert res == 'test1\n'
 
     if hasattr(__import__(os.name), '_getfullpathname'):
         def test__getfullpathname(self):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to