From a358a73547f58b1bee214c889b539969a53202f7 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sun, 27 May 2012 22:09:47 -0700 Subject: [PATCH] Quick hack to make this test pass on cygwin --- tornado/test/iostream_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py index 6340eda9..5aa1d9bf 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