"""Test matches selectors."""
from .. import util
class TestMatches(util.TestCase):
"""Test matches selectors."""
MARKUP = """
Some text in a paragraph.
Link
"""
def test_matches(self):
"""Test multiple selectors with "matches"."""
self.assert_selector(
self.MARKUP,
":matches(span, a)",
["1", "2"],
flags=util.HTML
)
def test_nested_matches(self):
"""Test multiple nested selectors with "matches"."""
self.assert_selector(
self.MARKUP,
":matches(span, a:matches(#\\32))",
["1", "2"],
flags=util.HTML
)