Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit2aff0a3

Browse files
committed
Fix chardet test under Python 3 to read file as bytes
1 parent0941326 commit2aff0a3

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
importchardet
5656
deftest_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
assertencoding[0].lower()=="big5"
6060
exceptImportError:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp