diff options
| author | Michael Williamson <mike@zwobble.org> | 2022-11-25 22:50:05 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2022-11-25 22:58:16 +0000 |
| commit | 5093d72b9fece1a7c3d7a3d19e4161387ee6475a (patch) | |
| tree | c4122b0f72c7864897d78333e75328ac8c22685b /tests/docx/notes_xml_tests.py | |
| parent | 20e3e61530bef546058124c3015ae240733cc974 (diff) | |
Use pytest instead of nose
Diffstat (limited to 'tests/docx/notes_xml_tests.py')
| -rw-r--r-- | tests/docx/notes_xml_tests.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/docx/notes_xml_tests.py b/tests/docx/notes_xml_tests.py index 56a7681..086e6d8 100644 --- a/tests/docx/notes_xml_tests.py +++ b/tests/docx/notes_xml_tests.py @@ -1,13 +1,11 @@ -from nose.tools import istest, assert_equal - from mammoth import documents from mammoth.docx.xmlparser import element as xml_element from mammoth.docx.notes_xml import read_footnotes_xml_element from mammoth.docx import body_xml +from ..testing import assert_equal -@istest -def id_and_body_of_footnote_are_read(): +def test_id_and_body_of_footnote_are_read(): footnote_body = [xml_element("w:p")] footnotes = read_footnotes_xml_element(xml_element("w:footnotes", {}, [ xml_element("w:footnote", {"w:id": "1"}, footnote_body), @@ -17,13 +15,11 @@ def id_and_body_of_footnote_are_read(): assert_equal("1", footnotes.value[0].note_id) -@istest -def continuation_separator_is_ignored(): +def test_continuation_separator_is_ignored(): _assert_footnote_type_is_ignored("continuationSeparator") -@istest -def separator_is_ignored(): +def test_separator_is_ignored(): _assert_footnote_type_is_ignored("separator") @@ -33,4 +29,4 @@ def _assert_footnote_type_is_ignored(footnote_type): xml_element("w:footnote", {"w:id": "1", "w:type": footnote_type}, footnote_body), ]), body_reader=None) assert_equal(0, len(footnotes.value)) - + |
