Skip to content

Commit

Permalink
update pig-latin tests to 1.1.0 closes exercism#1019
Browse files Browse the repository at this point in the history
  • Loading branch information
nqeron committed Oct 29, 2017
1 parent 9f25653 commit d4b6577
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions exercises/pig-latin/pig_latin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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")

Expand Down Expand Up @@ -63,9 +60,20 @@ 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")




if __name__ == '__main__':
unittest.main()

0 comments on commit d4b6577

Please sign in to comment.