Skip to content

Commit 747f5ea

Browse files
committed
html5lib_adapter_test.py: Check html5lib test files were found
1 parent 6090064 commit 747f5ea

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

python/gumbo/html5lib_adapter_test.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,12 @@ def impl(self, inner_html, input, expected, errors):
152152

153153

154154
def BuildTestCases(cls):
155-
for filename in html5lib_test_files():
155+
test_files = html5lib_test_files()
156+
157+
if(len(test_files) == 0):
158+
cls.fail(cls, "Couldn't find html5lib test files, did you fetch the submodules?")
159+
160+
for filename in test_files:
156161
test_name = os.path.basename(filename).replace('.dat', '')
157162
for i, test in enumerate(TestData(filename)):
158163
# html5lib parses <noscript> tags as if the scripting-enabled flag is

0 commit comments

Comments
 (0)