Commit 60f9ce11 authored by Jason Madden's avatar Jason Madden

fixes for test_ssl on old 2.7

parent 4179f785
...@@ -306,6 +306,9 @@ class SSLSocket(socket): ...@@ -306,6 +306,9 @@ class SSLSocket(socket):
raise ValueError("Read on closed or unwrapped SSL socket.") raise ValueError("Read on closed or unwrapped SSL socket.")
if len == 0: if len == 0:
return b'' if buffer is None else 0 return b'' if buffer is None else 0
if len < 0:
# This is handled natively in python 2.7.12+
raise ValueError("Negative read length")
try: try:
if buffer is not None: if buffer is not None:
return self._sslobj.read(len, buffer) return self._sslobj.read(len, buffer)
......
...@@ -262,6 +262,13 @@ if sys.version_info[:3] <= (2, 7, 8): ...@@ -262,6 +262,13 @@ if sys.version_info[:3] <= (2, 7, 8):
'test_httpservers.SimpleHTTPServerTestCase.test_get' 'test_httpservers.SimpleHTTPServerTestCase.test_get'
] ]
if sys.version_info[:3] <= (2, 7, 11):
disabled_tests += [
# These were added/fixed in 2.7.12+
'test_ssl.ThreadedTests.test__https_verify_certificates',
'test_ssl.ThreadedTests.test__https_verify_envvar',
]
if sys.platform == 'darwin': if sys.platform == 'darwin':
disabled_tests += [ disabled_tests += [
......
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