We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca88466 commit 8e5ccbfCopy full SHA for 8e5ccbf
1 file changed
tests/test_module.py
@@ -129,6 +129,14 @@ def test_extra_tag():
129
assert Etree.tostring(root, method="html") == b'<html><body></body></html>'
130
131
132
+def test_find_empty_attribute():
133
+ # Check whether we can find an element with an empty attribute
134
+ html = "<html><body><form autofocus><input type='checkbox' checked></form></body></html>"
135
+ form = quick_parse_filter(html, "form", {"autofocus": True})
136
+ assert "autofocus" in form.attrib
137
+ assert form.find(".//input[@checked]") is not None
138
+
139
140
# ############################# HTML Entity ############################## #
141
142
0 commit comments