Author: Brian Kearns <[email protected]>
Branch:
Changeset: r69699:a4ea282a125e
Date: 2014-03-04 21:53 -0500
http://bitbucket.org/pypy/pypy/changeset/a4ea282a125e/
Log: speed up test_select by defining socket buffer sizes
diff --git a/pypy/module/select/test/test_select.py
b/pypy/module/select/test/test_select.py
--- a/pypy/module/select/test/test_select.py
+++ b/pypy/module/select/test/test_select.py
@@ -245,7 +245,8 @@
class AppTestSelectWithSockets(_AppTestSelect):
"""Same tests with connected sockets.
socket.socketpair() does not exists on win32,
- so we start our own server."""
+ so we start our own server.
+ """
spaceconfig = {
"usemodules": ["select", "_socket", "rctime", "thread"],
}
@@ -267,7 +268,7 @@
except OperationError, e: # should get a "Permission denied"
if not e.match(space, space.getattr(w_socketmod,
space.wrap("error"))):
raise
- print e
+ print e.errorstr(space)
except cls.w_sock_err, e: # should get a "Permission denied"
print e
else:
@@ -283,4 +284,8 @@
thread.start_new_thread(s2.connect, (self.sockaddress,))
s1, addr2 = self.sock.accept()
+ # speed up the tests that want to fill the buffers
+ s1.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 4096)
+ s2.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 4096)
+
return s1, s2
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit