diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-13 18:02:12 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-13 18:02:12 +0000 |
| commit | 4d09c8116dbf01487368c16a66ea13f07b3349a3 (patch) | |
| tree | 5d842b3aec7ca18a7a7903a82bd0abafc31ab302 /tests/style_reader_tests.py | |
| parent | 49d046acf05be128d404a419ecde05091efa30c1 (diff) | |
Parse styles
Diffstat (limited to 'tests/style_reader_tests.py')
| -rw-r--r-- | tests/style_reader_tests.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/style_reader_tests.py b/tests/style_reader_tests.py index 971cfac..2f852e5 100644 --- a/tests/style_reader_tests.py +++ b/tests/style_reader_tests.py @@ -1,7 +1,7 @@ from nose.tools import istest, assert_equal -from mammoth import html_paths, document_matchers, documents -from mammoth.style_reader import read_html_path, read_document_matcher +from mammoth import html_paths, document_matchers, documents, styles +from mammoth.style_reader import read_html_path, read_document_matcher, read_style @istest @@ -109,3 +109,11 @@ class ReadDocumentMatcherTests(object): document_matchers.run(style_name="Emphasis"), read_document_matcher("r.Emphasis") ) + + +@istest +def document_matcher_is_mapped_to_html_path_using_fat_arrow(): + assert_equal( + styles.style(document_matchers.paragraph(), html_paths.path([html_paths.element(["h1"])])), + read_style("p => h1") + ) |
