Skip to content

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy