8000 Make sure we are comparing json data structures with each other parti… · html5lib/html5lib-python@b4a73f0 · GitHub
[go: up one dir, main page]

Skip to content

Commit b4a73f0

Browse files
committed
Make sure we are comparing json data structures with each other particuarly in the case of characters outside the BMP where json requires encoding as UTF-16 surrogate pairs. This reinstates the dependency on simplejson which can be lifted if we replicate encoding bits are necessary
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40907
1 parent 7f2784d commit b4a73f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_tokenizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def normalizeTokens(tokens):
7373
for i, token in enumerate(tokens):
7474
if token[0] == u'ParseError':
7575
tokens[i] = token[0]
76-
return tokens
76+
return simplejson.loads(simplejson.dumps(tokens))
7777

7878
def tokensMatch(expectedTokens, receivedTokens, ignoreErrorOrder):
7979
"""Test whether the test has passed or failed

0 commit comments

Comments
 (0)
0