8000 Fix chardet test under Python 3 to read file as bytes · awesome-python/html5lib-python@2aff0a3 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2aff0a3

Browse files
committed
Fix chardet test under Python 3 to read file as bytes
1 parent 0941326 commit 2aff0a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

html5lib/tests/test_encoding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_encoding():
5454
try:
5555
import chardet
5656
def test_chardet():
57-
data = open(os.path.join(test_dir, "encoding" , "chardet", "test_big5.txt")).read()
57+
data = open(os.path.join(test_dir, "encoding" , "chardet", "test_big5.txt"), "rb").read()
5858
encoding = inputstream.HTMLInputStream(data).charEncoding
5959
assert encoding[0].lower() == "big5"
6060
except ImportError:

0 commit comments

Comments
 (0)
0