File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 1
1
import sys
2
2
import os
3
3
import unittest
4
+ import cStringIO
5
+ import warnings
6
+
4
7
from support import simplejson , html5lib_test_files
5
8
6
9
from html5lib .tokenizer import HTMLTokenizer
7
10
from html5lib import constants
8
11
9
- import cStringIO
10
-
11
12
class TokenizerTestParser (object ):
12
13
def __init__ (self , contentModelFlag , lastStartTag = None ):
13
14
self .tokenizer = HTMLTokenizer
@@ -56,6 +57,7 @@ def processEOF(self, token):
56
57
pass
57
58
58
59
def processParseError (self , token ):
60
+ print token
59
61
self .outputTokens .append ([u"ParseError" , token ["data" ]])
60
62
61
63
def concatenateCharacterTokens (tokens ):
@@ -137,6 +139,14 @@ def buildTestSuite():
137
139
testName = os .path .basename (filename ).replace (".test" ,"" )
138
140
if 'tests' in tests :
139
141
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
140
150
if 'contentModelFlags' not in test :
141
151
test ["contentModelFlags" ] = ["PCDATA" ]
142
152
for contentModelFlag in test ["contentModelFlags" ]:
You can’t perform that action at this time.
0 commit comments