@@ -27,7 +27,9 @@ def echo_server_connection():
27
27
client_sock , server_sock = socket .socketpair ()
28
28
with client_sock , server_sock :
29
29
t = threading .Thread (
30
- target = _ssl_echo_serve_sync , args = (server_sock ,), daemon = True
30
+ target = _ssl_echo_serve_sync ,
31
+ args = (server_sock ,),
32
+ daemon = True ,
31
33
)
32
34
t .start ()
33
35
@@ -101,7 +103,9 @@ def wrap_socket_via_wrap_bio(ctx, sock, **kwargs):
101
103
with echo_server_connection () as client_sock :
102
104
client_ctx = ssl .create_default_context (cafile = "trio-test-CA.pem" )
103
105
wrapped = wrap_socket (
104
- client_ctx , client_sock , server_hostname = "trio-test-1.example.org"
106
+ client_ctx ,
107
+ client_sock ,
108
+ server_hostname = "trio-test-1.example.org" ,
105
109
)
106
110
wrapped .do_handshake ()
107
111
wrapped .sendall (b"x" )
@@ -113,7 +117,9 @@ def wrap_socket_via_wrap_bio(ctx, sock, **kwargs):
113
117
with echo_server_connection () as client_sock :
114
118
client_ctx = ssl .create_default_context (cafile = "trio-test-CA.pem" )
115
119
wrapped = wrap_socket (
116
- client_ctx , client_sock , server_hostname = "trio-test-2.example.org"
120
+ client_ctx ,
121
+ client_sock ,
122
+ server_hostname = "trio-test-2.example.org" ,
117
123
)
118
124
try :
119
125
wrapped .do_handshake ()
@@ -126,7 +132,9 @@ def wrap_socket_via_wrap_bio(ctx, sock, **kwargs):
126
132
with echo_server_connection () as client_sock :
127
133
client_ctx = ssl .create_default_context (cafile = "trio-test-CA.pem" )
128
134
wrapped = wrap_socket (
129
- client_ctx , client_sock , server_hostname = "trio-test-2.example.org"
135
+ client_ctx ,
136
+ client_sock ,
137
+ server_hostname = "trio-test-2.example.org" ,
130
138
)
131
139
# We forgot to call do_handshake
132
140
# But the hostname is wrong so something had better error out...
0 commit comments