Make this test pass by checking for 61 which is what OS X uses as connection refused, apparently

This commit is contained in:
donovan
2009-03-28 15:40:41 -05:00
parent 91e2ffbcc6
commit 41d3298eb7

View File

@@ -35,7 +35,7 @@ class TestSocketErrors(unittest.TestCase):
s.connect(('127.0.0.1', 81))
except socket.error, ex:
code, text = ex.args
assert code == 111, (code, text)
assert code in [111, 61], (code, text)
assert 'refused' in text.lower(), (code, text)
if __name__=='__main__':