Skip to content

Commit

Permalink
fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
theabdallahnjr committed Jan 4, 2025
1 parent f64bfc2 commit 3b672ce
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion solutions/anagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
13 changes: 13 additions & 0 deletions solutions/tests/test_anagrams.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 3b672ce

Please sign in to comment.