diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-06-08 21:45:14 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-06-08 21:45:14 +0100 |
| commit | 178a640539e1af27fb7b64fc540adc17e58c30c4 (patch) | |
| tree | 6fc31d523668335cb72943f6299916b9f841ed1e /tests/style_reader_tests.py | |
| parent | 54faefdf17f764742da91685d10d589e0bc87f7d (diff) | |
Add support for reading style names in style maps
Diffstat (limited to 'tests/style_reader_tests.py')
| -rw-r--r-- | tests/style_reader_tests.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/style_reader_tests.py b/tests/style_reader_tests.py index 21b857e..c4ac513 100644 --- a/tests/style_reader_tests.py +++ b/tests/style_reader_tests.py @@ -80,6 +80,14 @@ class ReadDocumentMatcherTests(object): @istest + def reads_paragraph_with_style_name(self): + assert_equal( + document_matchers.paragraph(style_name="Heading 1"), + read_document_matcher("p[style-name='Heading 1']") + ) + + + @istest def reads_paragraph_ordered_list(self): assert_equal( document_matchers.paragraph(numbering=documents.numbering_level(1, is_ordered=True)), @@ -109,6 +117,14 @@ class ReadDocumentMatcherTests(object): document_matchers.run(style_id="Emphasis"), read_document_matcher("r.Emphasis") ) + + + @istest + def reads_run_with_style_name(self): + assert_equal( + document_matchers.run(style_name="Emphasis"), + read_document_matcher("r[style-name='Emphasis']") + ) @istest |
