Skip to content

Commit 3cc85c6

Browse files
author
James Graham
committed
Make sure html5lib is on the path for tests
1 parent 5078e07 commit 3cc85c6

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

html5lib/tests/support.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@
22
import sys
33
import glob
44

5-
import html5lib
5+
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+
615
from html5lib import html5parser, treebuilders
716

8-
base_path = os.path.split(__file__)[0]
17+
918
if os.path.exists(os.path.join(base_path, 'testdata')):
1019
#release
1120
test_dir = os.path.join(base_path, 'testdata')

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