diff --git a/emotions/__init__.py b/emotions/__init__.py index 3465c9b..9d64bff 100644 --- a/emotions/__init__.py +++ b/emotions/__init__.py @@ -13,6 +13,9 @@ def crying(self): def unamused(self): raise NotImplementedError() + + def surprised(self): + raise NotImplementedError() from emotions.ascii import AsciiEmotions diff --git a/emotions/ascii.py b/emotions/ascii.py index 65b22ca..be97fed 100644 --- a/emotions/ascii.py +++ b/emotions/ascii.py @@ -16,3 +16,6 @@ def crying(self): def unamused(self): return '--"' + + def surprised(self): + return ':O' diff --git a/emotions/emoji.py b/emotions/emoji.py index 180e4e2..de837a6 100644 --- a/emotions/emoji.py +++ b/emotions/emoji.py @@ -16,3 +16,6 @@ def crying(self): def unamused(self): return "😒" + + def surprised(self): + return "😮" diff --git a/emotions/tests/test_emotions.py b/emotions/tests/test_emotions.py index b16c255..3934be7 100644 --- a/emotions/tests/test_emotions.py +++ b/emotions/tests/test_emotions.py @@ -14,6 +14,12 @@ def test_frown(self): def test_bored(self): assert self.emotion_class.bored() == ":|" + def test_unamused(self): + assert self.emotion_class.unamused() == '--"' + + def test_surprised(self): + assert self.emotion_class.surprised() == ":O" + class TestEmojiEmotions: emotion_class = EmojiEmotions() @@ -29,3 +35,6 @@ def test_bored(self): def test_unamused(self): assert self.emotion_class.unamused() == "😒" + + def test_surprised(self): + assert self.emotion_class.surprised() == "😮" diff --git a/emotions/tests/test_menu.py b/emotions/tests/test_menu.py index 809e8cd..b8342d6 100644 --- a/emotions/tests/test_menu.py +++ b/emotions/tests/test_menu.py @@ -17,7 +17,8 @@ def test_init_emoji(self): "1": "crying", "2": "frown", "3": "smile", - "4": "unamused", + "4": "surprised", + "5": "unamused", } def test_init_ascii(self): @@ -29,7 +30,8 @@ def test_init_ascii(self): "1": "crying", "2": "frown", "3": "smile", - "4": "unamused", + "4": "surprised", + "5": "unamused", } def test_menu_options(self): @@ -39,7 +41,8 @@ def test_menu_options(self): "1. crying", "2. frown", "3. smile", - "4. unamused", + "4. surprised", + "5. unamused", ] @patch("builtins.input", side_effect=["0"]) @@ -56,7 +59,8 @@ def test_menu_choice_apple(self, mock_input): "1. crying", "2. frown", "3. smile", - "4. unamused", + "4. surprised", + "5. unamused", "", "", "😶",