You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
python-h2/SOURCES/0001-Fix-repr-checks-for-Py...

57 lines
1.8 KiB

From b892f39566e03591e9556e94708d9b208182ffab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
Date: Sun, 3 Jul 2022 12:05:05 +0200
Subject: [PATCH] Fix repr() checks for Python 3.11
In Python 3.11, repr() was modified, this commit fixes the
assertions to match the new repr() behavior.
Fix #1268
---
test/test_events.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/test_events.py b/test/test_events.py
index a6e8d83..954ca99 100644
--- a/test/test_events.py
+++ b/test/test_events.py
@@ -209,7 +209,7 @@ class TestEventReprs(object):
assert repr(e) == (
"<RemoteSettingsChanged changed_settings:{ChangedSetting("
- "setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
+ "setting=4, original_value=65536, "
"new_value=32768)}>"
)
@@ -251,7 +251,7 @@ class TestEventReprs(object):
assert repr(e) == (
"<StreamReset stream_id:919, "
- "error_code:ErrorCodes.ENHANCE_YOUR_CALM, remote_reset:False>"
+ "error_code:11, remote_reset:False>"
)
def test_pushedstreamreceived_repr(self):
@@ -286,7 +286,7 @@ class TestEventReprs(object):
assert repr(e) == (
"<SettingsAcknowledged changed_settings:{ChangedSetting("
- "setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
+ "setting=4, original_value=65536, "
"new_value=32768)}>"
)
@@ -319,7 +319,7 @@ class TestEventReprs(object):
e.additional_data = additional_data
assert repr(e) == (
- "<ConnectionTerminated error_code:ErrorCodes.INADEQUATE_SECURITY, "
+ "<ConnectionTerminated error_code:12, "
"last_stream_id:33, additional_data:%s>" % data_repr
)
--
2.36.1