From: Ben Darnell Date: Fri, 25 Jan 2013 04:13:00 +0000 (-0500) Subject: Get the test suite passing on windows again. X-Git-Tag: v3.0.0~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b26c07b6fac03aae40f691eb0e348c85e081939c;p=thirdparty%2Ftornado.git Get the test suite passing on windows again. --- diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py index 6d9f87834..79a2b730e 100644 --- a/tornado/test/iostream_test.py +++ b/tornado/test/iostream_test.py @@ -398,10 +398,16 @@ class TestIOStreamMixin(object): server.close() client.close() + @skipIfNonUnix def test_inline_read_error(self): # An error on an inline read is raised without logging (on the # assumption that it will eventually be noticed or logged further # up the stack). + # + # This test is posix-only because windows os.close() doesn't work + # on socket FDs, but we can't close the socket object normally + # because we won't get the error we want if the socket knows + # it's closed. server, client = self.make_iostream_pair() try: os.close(server.socket.fileno()) diff --git a/tornado/test/netutil_test.py b/tornado/test/netutil_test.py index a96b858ab..4342e18e3 100644 --- a/tornado/test/netutil_test.py +++ b/tornado/test/netutil_test.py @@ -14,8 +14,12 @@ except ImportError: class _ResolverTestMixin(object): def test_localhost(self): + # Note that windows returns IPPROTO_IP unless we specifically + # ask for IPPROTO_TCP (either will work to create a socket, + # but this test looks for an exact match) self.resolver.getaddrinfo('localhost', 80, socket.AF_UNSPEC, socket.SOCK_STREAM, + socket.IPPROTO_TCP, callback=self.stop) future = self.wait() self.assertIn(