From 4d09c8116dbf01487368c16a66ea13f07b3349a3 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 13 Dec 2013 18:02:12 +0000 Subject: Parse styles --- tests/style_reader_tests.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests') 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") + ) -- cgit v1.2.3