diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-11-29 21:54:31 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-11-29 21:54:31 +0000 |
| commit | 5bc676b074a651a70b3b259182a94120c036d74a (patch) | |
| tree | 5a7a46be69566f3472c4ca841983b7d6c6d60b4f /tests | |
| parent | 95394c062b971179a7fda954771bdb6390ba88b7 (diff) | |
Raise error on unrecognised string matcher
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/styles/parser/document_matcher_parser_tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/styles/parser/document_matcher_parser_tests.py b/tests/styles/parser/document_matcher_parser_tests.py index 0cf5f0e..194d6fa 100644 --- a/tests/styles/parser/document_matcher_parser_tests.py +++ b/tests/styles/parser/document_matcher_parser_tests.py @@ -47,6 +47,12 @@ def reads_paragraph_with_style_name_prefix(): @istest +def unrecognised_string_matcher_raises_error(): + error = assert_raises(LineParseError, lambda: read_document_matcher("p[style-name*='Heading']")) + assert_equal("Unrecognised string matcher: *", str(error)) + + +@istest def reads_paragraph_ordered_list(): assert_equal( document_matchers.paragraph(numbering=documents.numbering_level(1, is_ordered=True)), |
