def test_translate_01_ab_returns_a(self): self.assertEqual(translate("0", "01", "ab"), "a")
def test_translate_012_abc_returns_aac(self): self.assertEqual(translate("002", "012", "abc"), "c")
def test_translate_0123_ab_returns_bb(self): # a b ba bb # 0 1 2 3 self.assertEqual(translate("3", "0123", "ab"), "bb")
def test_translate(self): for i, data in enumerate(self.got): self.failUnlessEqual(alien.translate(*data), self.expected[i])