Skip to content

Commit bd5f462

Browse files
committed
Add tests for svg as well as png images
1 parent d685eea commit bd5f462

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/test_parsing.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
def valid(data):
1616
alt = data["alt"]
1717
title = data["title"]
18-
parsed = emojificate(alt)
19-
assert alt in parsed
20-
assert 'alt="{}"'.format(alt) in parsed
2118

22-
assert title in parsed
23-
assert 'aria-label="Emoji: {}"'.format(title) in parsed
19+
for filetype in ["png", "svg"]:
20+
parsed = emojificate(alt, filetype=filetype)
21+
assert alt in parsed
22+
assert 'alt="{}"'.format(alt) in parsed
23+
24+
assert title in parsed
25+
assert 'aria-label="Emoji: {}"'.format(title) in parsed
2426

2527

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

0 commit comments

Comments
 (0)