diff --git a/solutions/anagrams.py b/solutions/anagrams.py index a6c347ce1..9542f17ca 100644 --- a/solutions/anagrams.py +++ b/solutions/anagrams.py @@ -11,7 +11,7 @@ """ -def are_anagrams(word_1: str, word_2: str): +def are_anagrams(word_1: str, word_2: str) -> bool: """ Checks whether two strings are anagrams. diff --git a/solutions/tests/test_anagrams.py b/solutions/tests/test_anagrams.py index ae6bb80a8..a7aef81f7 100644 --- a/solutions/tests/test_anagrams.py +++ b/solutions/tests/test_anagrams.py @@ -1,3 +1,16 @@ +""" +A module for testing the are_anagrams function. + +Tests included: + - When two words are anagarms + - When two words are not anagrams + - When the input is two phrases, not words + - When the input is not a string + +Created on 04 01 24 +@author: Abdallah Alnajjar +""" + import unittest from ..anagrams import are_anagrams