Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix repr() checks for Python 3.10 #1254

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/test_basic_logic.py
Expand Up @@ -1845,7 +1845,7 @@ def test_stream_repr(self):
Ensure stream string representation is appropriate.
"""
s = h2.stream.H2Stream(4, None, 12, 14)
assert repr(s) == "<H2Stream id:4 state:<StreamState.IDLE: 0>>"
assert repr(s) == "<H2Stream id:4 state:StreamState.IDLE>"


def sanity_check_data_frame(data_frame,
Expand Down
8 changes: 4 additions & 4 deletions test/test_events.py
Expand Up @@ -209,7 +209,7 @@ def test_remotesettingschanged_repr(self):

assert repr(e) == (
"<RemoteSettingsChanged changed_settings:{ChangedSetting("
"setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
"setting=INITIAL_WINDOW_SIZE, original_value=65536, "
"new_value=32768)}>"
)

Expand Down Expand Up @@ -251,7 +251,7 @@ def test_streamreset_repr(self):

assert repr(e) == (
"<StreamReset stream_id:919, "
"error_code:ErrorCodes.ENHANCE_YOUR_CALM, remote_reset:False>"
"error_code:ENHANCE_YOUR_CALM, remote_reset:False>"
)

def test_pushedstreamreceived_repr(self):
Expand Down Expand Up @@ -286,7 +286,7 @@ def test_settingsacknowledged_repr(self):

assert repr(e) == (
"<SettingsAcknowledged changed_settings:{ChangedSetting("
"setting=SettingCodes.INITIAL_WINDOW_SIZE, original_value=65536, "
"setting=INITIAL_WINDOW_SIZE, original_value=65536, "
"new_value=32768)}>"
)

Expand Down Expand Up @@ -319,7 +319,7 @@ def test_connectionterminated_repr(self, additional_data, data_repr):
e.additional_data = additional_data

assert repr(e) == (
"<ConnectionTerminated error_code:ErrorCodes.INADEQUATE_SECURITY, "
"<ConnectionTerminated error_code:INADEQUATE_SECURITY, "
"last_stream_id:33, additional_data:%s>" % data_repr
)

Expand Down