Skip to content

Commit

Permalink
fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hitblast committed Aug 11, 2024
1 parent 3ccc09a commit 01d73cd
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def test_patterns_with_rules_svaravarna() -> NoReturn:

def test_non_ascii() -> NoReturn:
"""
Test parser response for non-ASCII characters.
Parser should return any non-ASCII characters that is passed to it.
Test processor response for non-ASCII characters.
Parse function should return any non-ASCII characters that is passed to it.
"""

# Mixed strings.
Expand All @@ -126,6 +126,18 @@ def test_non_ascii() -> NoReturn:
assert key == avro.parse(value)


def test_ascii() -> NoReturn:
"""
Test processor response for ASCII characters.
Reverse function should return any ASCII characters that is passed to it.
"""

assert "Avwg evsjvi gan MvB|" == avro.reverse("Avwg evsjvi গান MvB|")
assert "Avwg amar Avwg‡K wPiw`b GB banglay Lyu‡R cvB!" == avro.reverse(
"Avwg আমার Avwg‡K wPiw`b GB বাংলায় Lyu‡R cvB!"
)


def test_words_with_punctuations() -> NoReturn:
"""
Test parsing and reversing of words with punctuations.
Expand Down Expand Up @@ -201,6 +213,12 @@ def test_parse_sentences() -> NoReturn:
] == avro.parse("ami banglar gan gai.", "ami amar amike cirodin ei banglay khu^je pai!", bijoy=True)


def test_reverse_error() -> NoReturn:
"""
Tests
"""


def test_reverse_sentences() -> NoReturn:
"""
Test reversing of sentences (Unicode).
Expand Down

0 comments on commit 01d73cd

Please sign in to comment.