From a098466259ce25c82f5c5faa5b2dcd3b9c8f90d6 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 8 Feb 2015 20:39:42 +0000 Subject: Handle image elements with no src in markdown writer --- tests/writers/markdown_tests.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/writers/markdown_tests.py b/tests/writers/markdown_tests.py index 94fcd06..f0e4ba0 100644 --- a/tests/writers/markdown_tests.py +++ b/tests/writers/markdown_tests.py @@ -124,6 +124,13 @@ def images_are_written_even_if_they_dont_have_alt_text(): writer = _create_writer() writer.self_closing("img", {"src": "http://example.com/image.jpg"}) assert_equal("![](http://example.com/image.jpg)", writer.as_string()) + + +@istest +def images_are_written_even_if_they_dont_have_a_src_attribute(): + writer = _create_writer() + writer.self_closing("img", {"alt": "Alt Text"}) + assert_equal("![Alt Text]()", writer.as_string()) def _create_writer(): -- cgit v1.2.3