aboutsummaryrefslogtreecommitdiff
path: root/tests/options_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/options_tests.py')
-rw-r--r--tests/options_tests.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/options_tests.py b/tests/options_tests.py
index 182678e..e3d09ef 100644
--- a/tests/options_tests.py
+++ b/tests/options_tests.py
@@ -1,16 +1,13 @@
-from nose.tools import istest, assert_equal
-
from mammoth.options import read_options, _default_style_map
from mammoth.styles.parser import read_style_mapping
+from .testing import assert_equal
-@istest
-def default_style_map_is_used_if_style_map_is_not_set():
+def test_default_style_map_is_used_if_style_map_is_not_set():
assert_equal(_default_style_map, read_options({}).value["style_map"])
-@istest
-def custom_style_mappings_are_prepended_to_default_style_mappings():
+def test_custom_style_mappings_are_prepended_to_default_style_mappings():
style_map = read_options({
"style_map": "p.SectionTitle => h2"
}).value["style_map"]
@@ -18,8 +15,7 @@ def custom_style_mappings_are_prepended_to_default_style_mappings():
assert_equal(_default_style_map, style_map[1:])
-@istest
-def default_style_mappings_are_ignored_if_include_default_style_map_is_false():
+def test_default_style_mappings_are_ignored_if_include_default_style_map_is_false():
style_map = read_options({
"style_map": "p.SectionTitle => h2",
"include_default_style_map": False
@@ -27,8 +23,7 @@ def default_style_mappings_are_ignored_if_include_default_style_map_is_false():
assert_equal([read_style_mapping("p.SectionTitle => h2").value], style_map)
-@istest
-def lines_starting_with_hash_in_custom_style_map_are_ignored():
+def test_lines_starting_with_hash_in_custom_style_map_are_ignored():
style_map = read_options({
"style_map": "#p.SectionTitle => h3\np.SectionTitle => h2",
"include_default_style_map": False