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/images_tests.py | |
| parent | 20e3e61530bef546058124c3015ae240733cc974 (diff) | |
Use pytest instead of nose
Diffstat (limited to 'tests/images_tests.py')
| -rw-r--r-- | tests/images_tests.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/images_tests.py b/tests/images_tests.py index 0ab29e1..6e2487d 100644 --- a/tests/images_tests.py +++ b/tests/images_tests.py @@ -1,18 +1,15 @@ import io -from nose.tools import istest from precisely import assert_that, has_attrs, is_sequence import mammoth -@istest -def inline_is_available_as_alias_of_img_element(): +def test_inline_is_available_as_alias_of_img_element(): assert mammoth.images.inline is mammoth.images.img_element -@istest -def data_uri_encodes_images_in_base64(): +def test_data_uri_encodes_images_in_base64(): image_bytes = b"abc" image = mammoth.documents.Image( alt_text=None, @@ -27,9 +24,7 @@ def data_uri_encodes_images_in_base64(): )) -@istest class ImgElementTests: - @istest def test_when_element_does_not_have_alt_text_then_alt_attribute_is_not_set(self): image_bytes = b"abc" image = mammoth.documents.Image( @@ -48,7 +43,6 @@ class ImgElementTests: has_attrs(attributes={"src": "<src>"}), )) - @istest def test_when_element_se_alt_text_then_alt_attribute_is_set(self): image_bytes = b"abc" image = mammoth.documents.Image( @@ -67,7 +61,6 @@ class ImgElementTests: has_attrs(attributes={"alt": "<alt>", "src": "<src>"}), )) - @istest def test_image_alt_text_can_be_overridden_by_alt_attribute_returned_from_function(self): image_bytes = b"abc" image = mammoth.documents.Image( |
