Fix #5648: NodeMatcher matches Text node on attribute match

This commit is contained in:
Takeshi KOMIYA committed 2018-11-25 01:16:17 +09:00
1 parent 9c2fd94204
commit 722c92250c
2 files changed
+7

No files matched your search

+4
View File
@@ -82,6 +82,10 @@ def test_NodeMatcher():
matcher = NodeMatcher(nodes.title)
assert len(doctree.traverse(matcher)) == 0
# search with Any does not match to Text node
matcher = NodeMatcher(blah=Any)
assert len(doctree.traverse(matcher)) == 0
@pytest.mark.parametrize(
'rst,node_cls,count',