Author: Armin Rigo <[email protected]>
Branch: py3.5-noninherit
Changeset: r86563:611f7fa27fb9
Date: 2016-08-26 16:10 +0200
http://bitbucket.org/pypy/pypy/changeset/611f7fa27fb9/

Log:    os.fdopen()

diff --git a/pypy/module/_io/test/test_fileio.py 
b/pypy/module/_io/test/test_fileio.py
--- a/pypy/module/_io/test/test_fileio.py
+++ b/pypy/module/_io/test/test_fileio.py
@@ -252,6 +252,17 @@
         assert posix.get_inheritable(f.fileno()) == False
         f.close()
 
+    def test_FileIO_fd_does_change_inheritable(self):
+        import _io, posix
+        fd1, fd2 = posix.pipe()
+        posix.set_inheritable(fd1, True)
+        f1 = _io.FileIO(fd1, 'r')
+        f2 = _io.FileIO(fd2, 'w')
+        assert posix.get_inheritable(fd1) == False
+        assert posix.get_inheritable(fd2) == True
+        f1.close()
+        f2.close()
+
     def test_close_upon_reinit(self):
         import _io, posix
         f = _io.FileIO(self.tmpfile, 'r')
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to