Skip to content

Commit

Permalink
refactor: tests: emoji_data: Add type annotations.
Browse files Browse the repository at this point in the history
This commit adds parameter and return type annotations or hints to the
`test_emoji_data.py` file, that contains tests for its counterpart
`unicode_emoji.py` from  the `zulipterminal` module, to make mypy
checks consistent and improve code readability.
  • Loading branch information
prah23 authored and neiljp committed Jul 14, 2021
1 parent 3800417 commit ad8e489
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/emoji_data/test_emoji_data.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
from collections import OrderedDict
from typing import Dict

from zulipterminal.unicode_emojis import EMOJI_DATA


def test_generated_emoji_list_sorted():
def test_generated_emoji_list_sorted() -> None:
assert EMOJI_DATA == OrderedDict(sorted(EMOJI_DATA.items()))


def test_unicode_emojis_fixture_sorted(unicode_emojis):
def test_unicode_emojis_fixture_sorted(
unicode_emojis: "OrderedDict[str, Dict[str, str]]",
) -> None:
assert unicode_emojis == OrderedDict(sorted(unicode_emojis.items()))

0 comments on commit ad8e489

Please sign in to comment.