From c8516d0a4e9467d4313af4ba63196bca184812b3 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 24 Nov 2016 22:13:00 +0000 Subject: Use recursive descent parser instead of parsimonious --- tests/options_tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/options_tests.py') diff --git a/tests/options_tests.py b/tests/options_tests.py index f0b0beb..182678e 100644 --- a/tests/options_tests.py +++ b/tests/options_tests.py @@ -1,7 +1,7 @@ from nose.tools import istest, assert_equal -from mammoth import style_reader from mammoth.options import read_options, _default_style_map +from mammoth.styles.parser import read_style_mapping @istest @@ -14,7 +14,7 @@ def custom_style_mappings_are_prepended_to_default_style_mappings(): style_map = read_options({ "style_map": "p.SectionTitle => h2" }).value["style_map"] - assert_equal(style_reader.read_style("p.SectionTitle => h2").value, style_map[0]) + assert_equal(read_style_mapping("p.SectionTitle => h2").value, style_map[0]) assert_equal(_default_style_map, style_map[1:]) @@ -24,7 +24,7 @@ def default_style_mappings_are_ignored_if_include_default_style_map_is_false(): "style_map": "p.SectionTitle => h2", "include_default_style_map": False }).value["style_map"] - assert_equal([style_reader.read_style("p.SectionTitle => h2").value], style_map) + assert_equal([read_style_mapping("p.SectionTitle => h2").value], style_map) @istest @@ -33,4 +33,4 @@ def lines_starting_with_hash_in_custom_style_map_are_ignored(): "style_map": "#p.SectionTitle => h3\np.SectionTitle => h2", "include_default_style_map": False }).value["style_map"] - assert_equal([style_reader.read_style("p.SectionTitle => h2").value], style_map) + assert_equal([read_style_mapping("p.SectionTitle => h2").value], style_map) -- cgit v1.2.3