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

Lines changed: 8 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy