-
-
Notifications
You must be signed in to change notification settings - Fork 808
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
Support brotlicffi in tests #2906
Comments
Yes, that would be great! |
Alternate options:
- compressed_body = brotli.compress(body)
+ compressed_body = b"\x8b\x03\x80test 123\x03" - body = b"test 123"
- compressed_body = brotli.compress(body)[3:]
+ compressed_body = b"invalid" |
That would work for us since we care about
Yeah, that would work for me. Please let me know which approach you prefer and I can do it. |
I'd suggest the second. |
mgorny
added a commit
to mgorny/httpx
that referenced
this issue
Nov 10, 2023
Inline the compressed Brotli samples in tests to make them independent of Brotli implementation. This makes it possible to run the test suite both against Brotli and brotlicffi. Fixes encode#2906
mgorny
added a commit
to mgorny/httpx
that referenced
this issue
Nov 10, 2023
Inline the compressed Brotli samples in tests to make them independent of Brotli implementation. This makes it possible to run the test suite both against Brotli and brotlicffi. Fixes encode#2906
tomchristie
pushed a commit
that referenced
this issue
Nov 10, 2023
Inline the compressed Brotli samples in tests to make them independent of Brotli implementation. This makes it possible to run the test suite both against Brotli and brotlicffi. Fixes #2906
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While the package itself can work with either
brotli
orbrotlicffi
,tests/test_decoders.py
explicitly requiresbrotli
. We're currently working on having all packages supportbrotlicffi
in Gentoo, sincebrotli
doesn't work reliably on PyPy3. Could you please consider making the test acceptbrotlicffi
as well?I suppose the simplest way would be to reuse the existing logic, i.e.:
I can submit a PR for that.
The text was updated successfully, but these errors were encountered: