@@ -207,11 +207,18 @@ def test_remotesettingschanged_repr(self):
207
207
),
208
208
}
209
209
210
- assert repr (e ) == (
211
- "<RemoteSettingsChanged changed_settings:{ChangedSetting("
212
- "setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
213
- "new_value=32768)}>"
214
- )
210
+ if sys .version_info >= (3 , 11 ):
211
+ assert repr (e ) == (
212
+ "<RemoteSettingsChanged changed_settings:{ChangedSetting("
213
+ "setting=4, original_value=65536, "
214
+ "new_value=32768)}>"
215
+ )
216
+ else :
217
+ assert repr (e ) == (
218
+ "<RemoteSettingsChanged changed_settings:{ChangedSetting("
219
+ "setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
220
+ "new_value=32768)}>"
221
+ )
215
222
216
223
def test_pingreceived_repr (self ):
217
224
"""
@@ -249,10 +256,16 @@ def test_streamreset_repr(self):
249
256
e .error_code = h2 .errors .ErrorCodes .ENHANCE_YOUR_CALM
250
257
e .remote_reset = False
251
258
252
- assert repr (e ) == (
253
- "<StreamReset stream_id:919, "
254
- "error_code:ErrorCodes.ENHANCE_YOUR_CALM, remote_reset:False>"
255
- )
259
+ if sys .version_info >= (3 , 11 ):
260
+ assert repr (e ) == (
261
+ "<StreamReset stream_id:919, "
262
+ "error_code:11, remote_reset:False>"
263
+ )
264
+ else :
265
+ assert repr (e ) == (
266
+ "<StreamReset stream_id:919, "
267
+ "error_code:ErrorCodes.ENHANCE_YOUR_CALM, remote_reset:False>"
268
+ )
256
269
257
270
def test_pushedstreamreceived_repr (self ):
258
271
"""
@@ -284,11 +297,18 @@ def test_settingsacknowledged_repr(self):
284
297
),
285
298
}
286
299
287
- assert repr (e ) == (
288
- "<SettingsAcknowledged changed_settings:{ChangedSetting("
289
- "setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
290
- "new_value=32768)}>"
291
- )
300
+ if sys .version_info >= (3 , 11 ):
301
+ assert repr (e ) == (
302
+ "<SettingsAcknowledged changed_settings:{ChangedSetting("
303
+ "setting=4, original_value=65536, "
304
+ "new_value=32768)}>"
305
+ )
306
+ else :
307
+ assert repr (e ) == (
308
+ "<SettingsAcknowledged changed_settings:{ChangedSetting("
309
+ "setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
310
+ "new_value=32768)}>"
311
+ )
292
312
293
313
def test_priorityupdated_repr (self ):
294
314
"""
@@ -318,10 +338,16 @@ def test_connectionterminated_repr(self, additional_data, data_repr):
318
338
e .last_stream_id = 33
319
339
e .additional_data = additional_data
320
340
321
- assert repr (e ) == (
322
- "<ConnectionTerminated error_code:ErrorCodes.INADEQUATE_SECURITY, "
323
- "last_stream_id:33, additional_data:%s>" % data_repr
324
- )
341
+ if sys .version_info >= (3 , 11 ):
342
+ assert repr (e ) == (
343
+ "<ConnectionTerminated error_code:12, "
344
+ "last_stream_id:33, additional_data:%s>" % data_repr
345
+ )
346
+ else :
347
+ assert repr (e ) == (
348
+ "<ConnectionTerminated error_code:ErrorCodes.INADEQUATE_SECURITY, "
349
+ "last_stream_id:33, additional_data:%s>" % data_repr
350
+ )
325
351
326
352
def test_alternativeserviceavailable_repr (self ):
327
353
"""
0 commit comments