Skip to content

Commit

Permalink
Add tests for svg as well as png images
Browse files Browse the repository at this point in the history
  • Loading branch information
glasnt committed Jan 12, 2023
1 parent d685eea commit bd5f462
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
def valid(data):
alt = data["alt"]
title = data["title"]
parsed = emojificate(alt)
assert alt in parsed
assert 'alt="{}"'.format(alt) in parsed

assert title in parsed
assert 'aria-label="Emoji: {}"'.format(title) in parsed
for filetype in ["png", "svg"]:
parsed = emojificate(alt, filetype=filetype)
assert alt in parsed
assert 'alt="{}"'.format(alt) in parsed

assert title in parsed
assert 'aria-label="Emoji: {}"'.format(title) in parsed


@pytest.mark.skipif(sys.version_info.minor < 7, reason="requires Python 3.7 or higher")
Expand Down

0 comments on commit bd5f462

Please sign in to comment.