Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 25cca38

Browse files
[1.26] Fix test_ssl_object_attributes
Co-authored-by: Seth Michael Larson <[email protected]>
1 parent bbea166 commit 25cca38

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/test_ssltransport.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,11 @@ def test_ssl_object_attributes(self):
202202
assert ssock.selected_npn_protocol() is None
203203

204204
shared_ciphers = ssock.shared_ciphers()
205-
assert type(shared_ciphers) == list
206-
assert len(shared_ciphers) > 0
205+
# SSLContext.shared_ciphers() changed behavior completely in a patch version.
206+
# See: https://github.com/python/cpython/issues/96931
207+
assert shared_ciphers is None or (
208+
type(shared_ciphers) is list and len(shared_ciphers) > 0
209+
)
207210

208211
assert ssock.compression() is None
209212

0 commit comments

Comments
 (0)