Skip to content

Commit ca6591c

Browse files
committed
Make sure lint is testing everything treewalkers can do.
1 parent c335295 commit ca6591c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

html5lib/filters/lint.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ def __iter__(self):
6262
elif type == "Doctype":
6363
name = token["name"]
6464
assert name is None or isinstance(name, text_type)
65-
# XXX: what to do with token["data"] ?
65+
assert token["publicId"] is None or isinstance(name, text_type)
66+
assert token["systemId"] is None or isinstance(name, text_type)
67+
68+
elif type == "Entity":
69+
assert isinstance(token["name"], text_type)
70+
71+
elif type == "SerializerError":
72+
assert isinstance(token["data"], text_type)
6673

6774
else:
6875
assert False, "Unknown token type: %(type)s" % {"type": type}

0 commit comments

Comments
 (0)