]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Get the test suite passing on windows again.
authorBen Darnell <ben@bendarnell.com>
Fri, 25 Jan 2013 04:13:00 +0000 (23:13 -0500)
committerBen Darnell <ben@bendarnell.com>
Fri, 25 Jan 2013 04:13:00 +0000 (23:13 -0500)
tornado/test/iostream_test.py
tornado/test/netutil_test.py

index 6d9f878346dc71783e52a29954ec0124db4566f8..79a2b730efe4b1f5e092bd029e8fb53d0bf489f7 100644 (file)
@@ -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())
index a96b858ab62b60db529636cf2c2d1359115a56f9..4342e18e319d1d69fa04c45524396d2d6e36423a 100644 (file)
@@ -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(