Skip to content

Commit db5b9fe

Browse files
authored
Avoid bytes/string comparisons
1 parent ed850cf commit db5b9fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/brotlicffi/_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def decompress(self, data):
402402
error_code = lib.BrotliDecoderGetErrorCode(self._decoder)
403403
error_message = lib.BrotliDecoderErrorString(error_code)
404404
raise error(
405-
"Decompression error: %s" % ffi.string(error_message)
405+
b"Decompression error: %s" % ffi.string(error_message)
406406
)
407407

408408
# Next, copy the result out.

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ envlist = py27, py34, py35, py36, py37, py38, py39, pypy, lint
33

44
[testenv]
55
deps= -r{toxinidir}/test_requirements.txt
6-
commands= py.test --cov brotlicffi {posargs} {toxinidir}/test/
6+
commands= python -bb -m pytest --cov brotlicffi {posargs} {toxinidir}/test/
77

88
[testenv:pypy]
99
# temporarily disable coverage testing on PyPy due to performance problems

0 commit comments

Comments
 (0)