Skip to content

Commit

Permalink
basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
brownsugar-bobamilktea committed Aug 6, 2024
1 parent 1b10abf commit b2cea38
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_tocfl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from commands.tocfl.chewing import to_chewing
import pytest

@pytest.mark.parametrize(
"pinyin, expected_chewing",
[
("duìwŭ", "ㄉㄨㄟˋㄨˇ"),
("nóng", "ㄋㄨㄥˊ"),
("mínzhŭ", "ㄇㄧㄣˊㄓㄨˇ"),
]
)
def test_to_chewing(pinyin, expected_chewing):
assert to_chewing(pinyin).replace("\u3000", "") == expected_chewing # remove spaces

0 comments on commit b2cea38

Please sign in to comment.