aboutsummaryrefslogtreecommitdiff
path: root/tests/styles/document_matcher_tests.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2022-11-25 22:50:05 +0000
committerMichael Williamson <mike@zwobble.org>2022-11-25 22:58:16 +0000
commit5093d72b9fece1a7c3d7a3d19e4161387ee6475a (patch)
treec4122b0f72c7864897d78333e75328ac8c22685b /tests/styles/document_matcher_tests.py
parent20e3e61530bef546058124c3015ae240733cc974 (diff)
Use pytest instead of nose
Diffstat (limited to 'tests/styles/document_matcher_tests.py')
-rw-r--r--tests/styles/document_matcher_tests.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/styles/document_matcher_tests.py b/tests/styles/document_matcher_tests.py
index dccf4f1..f9034ce 100644
--- a/tests/styles/document_matcher_tests.py
+++ b/tests/styles/document_matcher_tests.py
@@ -1,17 +1,14 @@
-from nose.tools import istest, assert_equal
-
from mammoth import document_matchers
+from ..testing import assert_equal
-@istest
-def equal_to_matcher_is_case_insensitive():
+def test_equal_to_matcher_is_case_insensitive():
matcher = document_matchers.equal_to("Heading 1")
assert_equal(True, matcher.matches("heaDING 1"))
assert_equal(False, matcher.matches("heaDING 2"))
-@istest
-def starts_with_matcher_matches_string_with_prefix():
+def test_starts_with_matcher_matches_string_with_prefix():
matcher = document_matchers.starts_with("Heading")
assert_equal(True, matcher.matches("Heading"))
assert_equal(True, matcher.matches("Heading 1"))
@@ -20,7 +17,6 @@ def starts_with_matcher_matches_string_with_prefix():
assert_equal(False, matcher.matches("Header 2"))
-@istest
-def starts_with_matcher_is_case_insensitive():
+def test_starts_with_matcher_is_case_insensitive():
matcher = document_matchers.starts_with("Heading")
assert_equal(True, matcher.matches("heaDING"))