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