def self_closing_elements_are_never_empty(): assert_equal( [html.self_closing_element("br")], html.strip_empty([html.self_closing_element("br")]))
def convert_image(image): with image.open() as image_file: return [html.self_closing_element("img", {"alt": image_file.read().decode("ascii")})]
def convert_image(image): with image.open() as image_file: return [ html.self_closing_element( "img", {"alt": image_file.read().decode("ascii")}) ]