Author: Carl Friedrich Bolz-Tereick <[email protected]>
Branch: py3.6
Changeset: r94647:8daf0c2b6487
Date: 2018-05-21 20:35 +0200
http://bitbucket.org/pypy/pypy/changeset/8daf0c2b6487/

Log:    failing test that shows the problem of test_compileall.py

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
@@ -87,6 +87,15 @@
         assert f.readline() == b''
         f.close()
 
+    def test_support_fspath(self):
+        import _io
+        class P(object):
+            def __fspath__(x):
+                return self.tmpfile
+        f = _io.FileIO(P(), 'rb')
+        assert f.readline() == b'a\n'
+        f.close()
+
     def test_readlines(self):
         import _io
         f = _io.FileIO(self.tmpfile, 'rb')
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to