Skip to content

Commit b1f360a

Browse files
committed
Remove test sites and get unit tests to run with installed library on branch
--HG-- branch : 0.2_branch extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/branches/0.2_branch%40429
1 parent e38dd33 commit b1f360a

File tree

3 files changed

+5
-109
lines changed

3 files changed

+5
-109
lines changed

parse.py

Lines changed: 0 additions & 97 deletions
This file was deleted.

tests/test_parser.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@
55
import unittest
66
import new
77

8-
# XXX Allow us to import the sibling module
9-
os.chdir(os.path.split(os.path.abspath(__file__))[0])
10-
sys.path.insert(0, os.path.abspath(os.path.join(os.pardir, "src")))
11-
12-
import parser
8+
from html5lib import parser
139
#Run tests over all treebuilders
1410
#XXX - it would be nice to automate finding all treebuilders or to allow running just one
15-
from treebuilders import simpletree, etree
11+
from html5lib.treebuilders import simpletree, etree
1612

1713
treetypes = {"simpletree":simpletree.TreeBuilder,
1814
"ElementTree":etree.TreeBuilder}

tests/test_tokenizer.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@
77

88
import simplejson
99

10-
#Allow us to import the parent module
11-
os.chdir(os.path.split(os.path.abspath(__file__))[0])
12-
sys.path.insert(0, os.path.abspath(os.path.join(os.pardir, "src")))
13-
14-
from tokenizer import HTMLTokenizer
15-
import constants
10+
import html5lib
11+
from html5lib.tokenizer import HTMLTokenizer
12+
from html5lib import constants
1613

1714
class TokenizerTestParser(object):
1815
def __init__(self, contentModelFlag, lastStartTag=None):

0 commit comments

Comments
 (0)