[Python-checkins] cpython (3.4): Issue #23972: Fix tests for Windows and Debian.

guido.van.rossum python-checkins at python.org
Tue Oct 6 11:25:53 EDT 2015


https://hg.python.org/cpython/rev/aebbf205ef6f
changeset:   98552:aebbf205ef6f
branch:      3.4
parent:      98549:6108d30dde21
user:        Guido van Rossum <guido at python.org>
date:        Tue Oct 06 08:24:10 2015 -0700
summary:
  Issue #23972: Fix tests for Windows and Debian.

files:
  Lib/test/test_asyncio/test_base_events.py |  5 +----
  1 files changed, 1 insertions(+), 4 deletions(-)


diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -1215,6 +1215,7 @@
 
     def test_create_datagram_endpoint_sock(self):
         sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+        sock.bind(('127.0.0.1', 0))
         fut = self.loop.create_datagram_endpoint(
             lambda: MyDatagramProto(create_future=True, loop=self.loop),
             sock=sock)
@@ -1307,10 +1308,6 @@
             self.assertTrue(
                 sock.getsockopt(
                     socket.SOL_SOCKET, socket.SO_REUSEPORT))
-        else:
-            self.assertFalse(
-                sock.getsockopt(
-                    socket.SOL_SOCKET, socket.SO_REUSEPORT))
         self.assertTrue(
             sock.getsockopt(
                 socket.SOL_SOCKET, socket.SO_BROADCAST))

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list