diff --git a/exercises/pig-latin/pig_latin_test.py b/exercises/pig-latin/pig_latin_test.py index 9fb5be9f829..da3cde5288f 100644 --- a/exercises/pig-latin/pig_latin_test.py +++ b/exercises/pig-latin/pig_latin_test.py @@ -3,7 +3,7 @@ from pig_latin import translate -# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0 +# Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 class PigLatinTests(unittest.TestCase): def test_word_beginning_with_a(self): @@ -30,9 +30,6 @@ def test_word_beginning_with_p(self): def test_word_beginning_with_k(self): self.assertEqual(translate("koala"), "oalakay") - def test_word_beginning_with_y(self): - self.assertEqual(translate("yellow"), "ellowyay") - def test_word_beginning_with_x(self): self.assertEqual(translate("xenon"), "enonxay") @@ -63,6 +60,15 @@ def test_word_beginning_with_yt(self): def test_word_beginning_with_xr(self): self.assertEqual(translate("xray"), "xrayay") + def test_word_beginning_with_y(self): + self.assertEqual(translate("yellow"), "ellowyay") + + def test_y_after_initial_consonant_cluster(self): + self.assertEqual(translate("rhythm"), "ythmrhay") + + def test_y_as_second_letter_in_two_letter_word(self): + self.assertEqual(translate("my"), "ymay") + def test_a_whole_phrase(self): self.assertEqual(translate("quick fast run"), "ickquay astfay unray")