Skip to content

Commit bfe955c

Browse files
committed
fixup! Generate tokenizer tests from testdata files
1 parent 8e1bef2 commit bfe955c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

html5lib/tests/tokenizer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import absolute_import, division, unicode_literals
22

3+
import codecs
34
import json
45
import warnings
56
import re
@@ -185,7 +186,7 @@ def capitalize(s):
185186

186187
class TokenizerFile(pytest.File):
187188
def collect(self):
188-
with open(str(self.fspath), "rb") as fp:
189+
with codecs.open(str(self.fspath), "r", encoding="utf-8") as fp:
189190
tests = json.load(fp)
190191
if 'tests' in tests:
191192
for i, test in enumerate(tests['tests']):

0 commit comments

Comments
 (0)