diff options
author | Charles-François Natali <cf.natali@gmail.com> | 2013-08-29 17:27:17 (GMT) |
---|---|---|
committer | Charles-François Natali <cf.natali@gmail.com> | 2013-08-29 17:27:17 (GMT) |
commit | f25f80c8391b49779188fde6f8863bc2948ab101 (patch) | |
tree | acd4d822967d7c9893d4ba2340c3314163a54d3a /Lib/test/test_socket.py | |
parent | e0d25ce1fe1fe4379776c6bbb12981aabda865fd (diff) | |
parent | 74b7408604a8f7c340ee1a13d83c337648c92afe (diff) | |
download | cpython-f25f80c8391b49779188fde6f8863bc2948ab101.zip cpython-f25f80c8391b49779188fde6f8863bc2948ab101.tar.gz cpython-f25f80c8391b49779188fde6f8863bc2948ab101.tar.bz2 |
Merge.
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r-- | Lib/test/test_socket.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 81b2876..ae84dbf 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1247,11 +1247,12 @@ class GeneralModuleTests(unittest.TestCase): c.settimeout(1.5) with self.assertRaises(ZeroDivisionError): signal.alarm(1) - c.sendall(b"x" * (1024**2)) + c.sendall(b"x" * support.SOCK_MAX_SIZE) if with_timeout: signal.signal(signal.SIGALRM, ok_handler) signal.alarm(1) - self.assertRaises(socket.timeout, c.sendall, b"x" * (1024**2)) + self.assertRaises(socket.timeout, c.sendall, + b"x" * support.SOCK_MAX_SIZE) finally: signal.alarm(0) signal.signal(signal.SIGALRM, old_alarm) @@ -4138,7 +4139,7 @@ class UnbufferedFileObjectClassTestCase(FileObjectClassTestCase): self.serv_skipped = None self.serv_conn.setblocking(False) # Try to saturate the socket buffer pipe with repeated large writes. - BIG = b"x" * (1024 ** 2) + BIG = b"x" * support.SOCK_MAX_SIZE LIMIT = 10 # The first write() succeeds since a chunk of data can be buffered n = self.write_file.write(BIG) |