Commit bd0fa0ef authored by Jason Madden's avatar Jason Madden

actually fix test__socket_ex on win/py3

parent 4d8a23c6
...@@ -12,8 +12,15 @@ class TestClosedSocket(greentest.TestCase): ...@@ -12,8 +12,15 @@ class TestClosedSocket(greentest.TestCase):
sock.close() sock.close()
try: try:
sock.send(b'a', timeout=1) sock.send(b'a', timeout=1)
raise AssertionError("Should not get here")
except (socket.error, OSError) as ex: except (socket.error, OSError) as ex:
if ex.args[0] != errno.EBADF: if ex.args[0] != errno.EBADF:
if sys.platform.startswith('win'):
# Windows/Py3 raises "OSError: [WinError 10038] "
# which is not standard and not what it does
# on Py2.
pass
else:
raise raise
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment