File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 11import sys
22import os
33import unittest
4+ import cStringIO
5+ import warnings
6+
47from support import simplejson , html5lib_test_files
58
69from html5lib .tokenizer import HTMLTokenizer
710from html5lib import constants
811
9- import cStringIO
10-
1112class 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
6163def 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" ]:
You can’t perform that action at this time.
0 commit comments