Commit ceb9ec58 authored by Denis Bilenko's avatar Denis Bilenko

add TestClosedSocket to test__socket.py (for issue #115)

parent b1e4bdb3
......@@ -186,5 +186,19 @@ class TestCreateConnection(greentest.TestCase):
raise AssertionError('create_connection did not raise socket.error as expected')
class TestClosedSocket(greentest.TestCase):
switch_expected = False
def test(self):
sock = socket.socket()
sock.close()
try:
sock.send('a', timeout=1)
except socket.error, ex:
if ex.errno != 9:
raise
if __name__ == '__main__':
greentest.main()
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