-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #273
- Loading branch information
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import unittest | ||
|
||
from ovos_workshop.skills.ovos import _join_word_list_it | ||
|
||
|
||
class TestJoinWordListIt(unittest.TestCase): | ||
|
||
def test_basic_conjunction_and(self): | ||
# Test without euphonic transformation for "and" | ||
result = _join_word_list_it(["mare", "montagna"], "and") | ||
self.assertEqual(result, "mare e montagna") | ||
|
||
def test_basic_conjunction_or(self): | ||
# Test without euphonic transformation for "or" | ||
result = _join_word_list_it(["mare", "montagna"], "or") | ||
self.assertEqual(result, "mare o montagna") | ||
|
||
def test_euphonic_conjunction_or(self): | ||
# Test euphonic transformation for "or" to "od" | ||
result = _join_word_list_it(["mare", "oceano"], "or") | ||
self.assertEqual(result, "mare od oceano") | ||
|
||
def test_euphonic_conjunction_and(self): | ||
# Test euphonic transformation for "and" to "ed" | ||
result = _join_word_list_it(["inverno", "estate"], "and") | ||
self.assertEqual(result, "inverno ed estate") | ||
|
||
def test_euphonic_conjunction_or_with_other_words(self): | ||
# Test euphonic transformation for "or" to "od" with different words | ||
result = _join_word_list_it(["libro", "orologio"], "or") | ||
self.assertEqual(result, "libro od orologio") | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |