Issue #23972: Fix tests for Windows and Debian. (Merge 3.5->3.6)

This commit is contained in:
Guido van Rossum 2015-10-06 08:25:21 -07:00
commit 8ae2f0205c
1 changed files with 1 additions and 4 deletions

View File

@ -1215,6 +1215,7 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
def test_create_datagram_endpoint_sock(self): def test_create_datagram_endpoint_sock(self):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('127.0.0.1', 0))
fut = self.loop.create_datagram_endpoint( fut = self.loop.create_datagram_endpoint(
lambda: MyDatagramProto(create_future=True, loop=self.loop), lambda: MyDatagramProto(create_future=True, loop=self.loop),
sock=sock) sock=sock)
@ -1307,10 +1308,6 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
self.assertTrue( self.assertTrue(
sock.getsockopt( sock.getsockopt(
socket.SOL_SOCKET, socket.SO_REUSEPORT)) socket.SOL_SOCKET, socket.SO_REUSEPORT))
else:
self.assertFalse(
sock.getsockopt(
socket.SOL_SOCKET, socket.SO_REUSEPORT))
self.assertTrue( self.assertTrue(
sock.getsockopt( sock.getsockopt(
socket.SOL_SOCKET, socket.SO_BROADCAST)) socket.SOL_SOCKET, socket.SO_BROADCAST))