[Jython-checkins] jython (merge 2.5 -> default): Merge w/2.5: Fix for http://bugs.jython.org/issue1829 (test_socket.py failing
alan.kennedy
jython-checkins at python.org
Sat Mar 17 23:31:11 CET 2012
http://hg.python.org/jython/rev/782a32922f56
changeset: 6411:782a32922f56
parent: 6409:76287b6c2863
parent: 6410:b2ec53a0310f
user: Alan Kennedy <alan at xhaus.com>
date: Sat Mar 17 22:30:42 2012 +0000
summary:
Merge w/2.5: Fix for http://bugs.jython.org/issue1829 (test_socket.py failing on Ubuntu (Oneiric))
files:
Lib/test/test_socket.py | 11 +++++------
NEWS | 1 +
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -703,7 +703,7 @@
sock.setsockopt(level, option, expected_value)
retrieved_value = sock.getsockopt(level, option)
msg = "Retrieved option(%s, %s) value %s != %s(value set)" % (level, option, retrieved_value, expected_value)
- if is_solaris and option == socket.SO_RCVBUF:
+ if option == socket.SO_RCVBUF:
self.assert_(retrieved_value >= expected_value, msg)
else:
self.failUnlessEqual(retrieved_value, expected_value, msg)
@@ -735,12 +735,12 @@
sock.bind( (HOST, PORT+1) )
sock.connect( (HOST, PORT) )
msg = "Option value '%s'='%s' did not propagate to implementation socket" % (option, values[-1])
- if ((is_bsd or is_solaris) and option in (socket.SO_RCVBUF, socket.SO_SNDBUF)):
+ if option in (socket.SO_RCVBUF, socket.SO_SNDBUF):
# NOTE: there's no guarantee that bufsize will be the
# exact setsockopt value, particularly after
# establishing a connection. seems it will be *at least*
# the values we test (which are rather small) on
- # BSDs. may need to relax this on other platforms also
+ # BSDs.
self.assert_(sock.getsockopt(level, option) >= values[-1], msg)
else:
self.failUnlessEqual(sock.getsockopt(level, option), values[-1], msg)
@@ -1692,9 +1692,8 @@
self.failUnlessEqual(repr(ipv4_address_tuple), "('127.0.0.1', 80)")
addrinfo = socket.getaddrinfo("localhost", 80, socket.AF_INET6, socket.SOCK_STREAM, 0, 0)
- if not addrinfo and is_bsd:
- # older FreeBSDs may have spotty IPV6 Java support (at least
- # our FreeBSD 6.2 buildbot does)
+ if not addrinfo:
+ # Maybe no IPv6 configured on the test machine.
return
ipv6_address_tuple = addrinfo[0][4]
self.failUnless (ipv6_address_tuple[0] in ["::1", "0:0:0:0:0:0:0:1"])
diff --git a/NEWS b/NEWS
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@
Jython 2.5.3b2
Bugs Fixed
+ - [ 1829 ] test_socket.py failing on Ubuntu (Oneiric)
- [ 1844 ] bad host returned by getsockname
Jython 2.5.3b1
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list