File size: 803 Bytes
065fee7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Test future selectors."""
from .. import util


class TestFuture(util.TestCase):
    """Test future selectors."""

    MARKUP = """
    <body>
    <div id="div">
    <p id="0">Some text <span id="1" class="foo:bar:foobar"> in a paragraph</span>.
    <a id="2" class="bar" href="http://google.com">Link</a>
    <a id="3">Placeholder text.</a>
    </p>
    </div>
    </body>
    """

    def test_future(self):
        """Test future (should match nothing)."""

        self.assert_selector(
            self.MARKUP,
            "p:future",
            [],
            flags=util.HTML
        )

    def test_not_future(self):
        """Test not future."""

        self.assert_selector(
            self.MARKUP,
            "p:not(:future)",
            ["0"],
            flags=util.HTML
        )