From 7ec71d46a83eade88f6d588f8f568f9759676c89 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 12 Jun 2016 14:12:45 -0400 Subject: [PATCH] netutil_test: use 127.0.0.1 instead of localhost The first binding of the port was to 127.0.0.1, so the second should be too. This may solve #1734. --- tornado/test/netutil_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tornado/test/netutil_test.py b/tornado/test/netutil_test.py index a645bef21..549c4fe1c 100644 --- a/tornado/test/netutil_test.py +++ b/tornado/test/netutil_test.py @@ -207,7 +207,7 @@ class TestPortAllocation(unittest.TestCase): sockets = [] socket, port = bind_unused_port(reuse_port=True) try: - sockets = bind_sockets(port, 'localhost', reuse_port=True) + sockets = bind_sockets(port, '127.0.0.1', reuse_port=True) self.assertTrue(all(s.getsockname()[1] == port for s in sockets)) finally: socket.close() -- 2.47.2