diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-14 15:29:59 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-14 15:29:59 +0000 |
| commit | de040b5c92e20d0b578be0cc4b63e032ae5698bc (patch) | |
| tree | 96ff0aae287379a535e7e6b711741ed8ffcb1f11 /tests/html_generation_tests.py | |
| parent | 8cf77f91fa81823af6c84ed7ca97a3a21dc89d6b (diff) | |
Handle element freshness when satisfying HTML paths
Diffstat (limited to 'tests/html_generation_tests.py')
| -rw-r--r-- | tests/html_generation_tests.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/html_generation_tests.py b/tests/html_generation_tests.py index 4a8a43c..4322d69 100644 --- a/tests/html_generation_tests.py +++ b/tests/html_generation_tests.py @@ -126,3 +126,15 @@ class SatisfyPathTests(object): satisfy_html_path(generator, path) generator.text("there") assert_equal('<blockquote><span>Hello</span><p>there', generator.html_string()) + + + @istest + def fresh_element_matches_nothing(self): + generator = HtmlGenerator() + generator.start("blockquote") + generator.start("p") + generator.text("Hello") + path = html_paths.path([html_paths.element(["blockquote"]), html_paths.element(["p"], fresh=True)]) + satisfy_html_path(generator, path) + generator.text("there") + assert_equal('<blockquote><p>Hello</p><p>there', generator.html_string()) |
