Skip to content

Commit ea2e0a3

Browse files
committed
Skip tokenizer tests that depend on the self-closing flag for 0.11
--HG-- extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401165
1 parent 40d23d6 commit ea2e0a3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/test_tokenizer.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import sys
22
import os
33
import unittest
4+
import cStringIO
5+
import warnings
6+
47
from support import simplejson, html5lib_test_files
58

69
from html5lib.tokenizer import HTMLTokenizer
710
from html5lib import constants
811

9-
import cStringIO
10-
1112
class TokenizerTestParser(object):
1213
def __init__(self, contentModelFlag, lastStartTag=None):
1314
self.tokenizer = HTMLTokenizer
@@ -56,6 +57,7 @@ def processEOF(self, token):
5657
pass
5758

5859
def processParseError(self, token):
60+
print token
5961
self.outputTokens.append([u"ParseError", token["data"]])
6062

6163
def concatenateCharacterTokens(tokens):
@@ -137,6 +139,14 @@ def buildTestSuite():
137139
testName = os.path.basename(filename).replace(".test","")
138140
if 'tests' in tests:
139141
for index,test in enumerate(tests['tests']):
142+
#Skip tests with a self closing flag
143+
skip = False
144+
for token in test["output"]:
145+
if token[0] == "StartTag" and len(token) == 4:
146+
skip = True
147+
break
148+
if skip:
149+
continue
140150
if 'contentModelFlags' not in test:
141151
test["contentModelFlags"] = ["PCDATA"]
142152
for contentModelFlag in test["contentModelFlags"]:

0 commit comments

Comments
 (0)