8000 Cope with windows newlines on unix, removed simplejson import from te… · awesome-python/html5lib-python@b3eeca8 · GitHub
[go: up one dir, main page]

Skip to content

Commit b3eeca8

Browse files
committed
Cope with windows newlines on unix, removed simplejson import from test_treewalkers as it's not used there.
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%40648
1 parent b91e6d0 commit b3eeca8

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

tests/test_tokenizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class simplejson:
1313
def load(f):
1414
true, false = True, False
1515
input=re.sub(r'(".*?(?<!\\)")',r'u\1',f.read().decode('utf-8'))
16-
return eval(input)
16+
return eval(input.replace('\r',''))
1717
load = staticmethod(load)
1818

1919
#RELEASE remove

tests/test_treewalkers.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@
55
import unittest
66
import new
77

8-
try:
9-
import simplejson
10-
except:
11-
import re
12-
class simplejson:
13-
def load(f):
14-
true, false = True, False
15-
input=re.sub(r'(".*?(?<!\\)")',r'u\1',f.read().decode('utf-8'))
16-
return eval(input)
17-
load = staticmethod(load)
18-
198
sys.path.insert(0, os.path.split(os.path.abspath(__file__))[0])
209
from test_parser import parseTestcase
2110

0 commit comments

Comments
 (0)
0