Commit a47a676b authored by Jason Madden's avatar Jason Madden

pypy 'incorrectly' raises a plain ssl.SSLError where CPython would raise a...

pypy 'incorrectly' raises a plain ssl.SSLError where CPython would raise a ssl.SSLEOFError, even though pypy defines that class. But pypy doesn't try too hard to match exact exceptions with cpython.
parent c0fa367b
......@@ -57,14 +57,16 @@ class TestSSL(test__socket.TestTCP):
server_sock[0][0].close()
def test_empty_send(self):
# Sending empty bytes with the 'send' method
# raises ssl.SSLEOFError in the stdlib. (just ssl.SSLError on
# py26). Issue 719
expected = getattr(ssl, 'SSLEOFError', ssl.SSLError)
# Issue 719
# Sending empty bytes with the 'send' method raises
# ssl.SSLEOFError in the stdlib. PyPy 4.0 and CPython 2.6
# both just raise the superclass, ssl.SSLError.
expected = ssl.SSLError
self.assertRaises(expected, self._test_sendall,
b'',
client_method='send')
def ssl_listener(address, private_key, certificate):
raw_listener = socket.socket()
greentest.bind_and_listen(raw_listener, address)
......
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