Skip to content

fix: resolve failing test in tests/test_logging_output.py #1238

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

Conversation

grapestore
Copy link
Contributor

Internal package’s WebSocket implementation, if bool is not defined, Python falls back to calling len. In our case, len returns the length of self.scope, which has been updated to always include at least the key "type": "websocket" to match the internal package implementation.

Additionally, for test stability and to verify the existence of the TestWebSocket instance, I have overridden bool in TestWebSocket class.

Copy link
Owner

@assafelovic assafelovic left a comment

Choose a reason for hiding this comment

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

This is great thank you!

@assafelovic assafelovic merged commit f39be57 into assafelovic:master Mar 7, 2025
@grapestore grapestore deleted the fix/resolve-failing-test-in-tests/test_logging_output.py branch March 7, 2025 13:46
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