Skip to content

Replacing @asyncio.corutine with async/await (adding support for Python 3.11).#2

Merged
krulis-martin merged 2 commits intomasterfrom
corutine-replace
Aug 15, 2023
Merged

Replacing @asyncio.corutine with async/await (adding support for Python 3.11).#2
krulis-martin merged 2 commits intomasterfrom
corutine-replace

Conversation

@krulis-martin
Copy link
Member

No description provided.

response.set_result(None)
websocket_mock.recv.return_value = received_id
websocket_mock.send.return_value = [None]
websocket_mock.send.return_value = response
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you considered this?

Suggested change
websocket_mock.send.return_value = response
websocket_mock.send.return_value = asyncio.Future()
websocket_mock.send.return_value.set_result(None)

It may read a bit better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have, a bit more verbose. And it is just a test...

@krulis-martin krulis-martin merged commit f65667c into master Aug 15, 2023
@krulis-martin krulis-martin deleted the corutine-replace branch August 15, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments