From: Ben Darnell Date: Mon, 28 May 2012 05:09:47 +0000 (-0700) Subject: Quick hack to make this test pass on cygwin X-Git-Tag: v2.3.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a358a73547f58b1bee214c889b539969a53202f7;p=thirdparty%2Ftornado.git Quick hack to make this test pass on cygwin --- diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py index 6340eda9e..5aa1d9bf9 100644 --- a/tornado/test/iostream_test.py +++ b/tornado/test/iostream_test.py @@ -7,6 +7,7 @@ from tornado.util import b from tornado.web import RequestHandler, Application import errno import socket +import sys import time @@ -93,7 +94,9 @@ class TestIOStream(AsyncHTTPTestCase, LogTrapTestCase): self.wait() self.assertFalse(self.connect_called) self.assertTrue(isinstance(stream.error, socket.error), stream.error) - self.assertEqual(stream.error.args[0], errno.ECONNREFUSED) + if sys.platform != 'cygwin': + # cygwin's errnos don't match those used on native windows python + self.assertEqual(stream.error.args[0], errno.ECONNREFUSED) def test_gaierror(self): # Test that IOStream sets its exc_info on getaddrinfo error