Skip to content

Commit 31df298

Browse files
author
James Graham
committed
Better fix to ensure right html5lib version is picked up
1 parent 3cc85c6 commit 31df298

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

html5lib/tests/support.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,6 @@
33
import glob
44

55
base_path = os.path.split(__file__)[0]
6-
try:
7-
import html5lib
8-
except ImportError:
9-
#development
10-
sys.path.insert(0, os.path.abspath(os.path.join(base_path,
11-
os.path.pardir,
12-
os.path.pardir)))
13-
import html5lib
14-
15-
from html5lib import html5parser, treebuilders
16-
176

187
if os.path.exists(os.path.join(base_path, 'testdata')):
198
#release
@@ -25,7 +14,13 @@
2514
os.path.pardir, os.path.pardir,
2615
os.path.pardir, 'testdata'))
2716
assert os.path.exists(test_dir), "Test data not found"
17+
#import the development html5lib
18+
sys.path.insert(0, os.path.abspath(os.path.join(base_path,
19+
os.path.pardir,
20+
os.path.pardir)))
2821

22+
import html5lib
23+
from html5lib import html5parser, treebuilders
2924
del base_path
3025

3126
import simplejson

0 commit comments

Comments
 (0)