Author: Armin Rigo <[email protected]>
Branch:
Changeset: r58660:c048b7d88060
Date: 2012-11-02 11:32 +0100
http://bitbucket.org/pypy/pypy/changeset/c048b7d88060/
Log: issue920: wrote a small test. Passes on CPython but not on PyPy.
diff --git a/pypy/module/_file/test/test_file_extra.py
b/pypy/module/_file/test/test_file_extra.py
--- a/pypy/module/_file/test/test_file_extra.py
+++ b/pypy/module/_file/test/test_file_extra.py
@@ -354,7 +354,7 @@
class AppTestAFewExtra:
def setup_class(cls):
- space = gettestobjspace(usemodules=('array',))
+ space = gettestobjspace(usemodules=('array', '_socket'))
cls.space = space
def setup_method(self, method):
@@ -606,3 +606,16 @@
repr(unicode(self.temptestfile)))
f.close()
+ def test_EAGAIN(self):
+ import _socket, posix
+ s1, s2 = _socket.socketpair()
+ s2.setblocking(False)
+ s1.send("hello")
+
+ f2 = posix.fdopen(posix.dup(s2.fileno()), 'rb', 0)
+ data = f2.read(12)
+ assert data == "hello"
+
+ f2.close()
+ s2.close()
+ s1.close()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit