def test_transform_4(self): """transform Unit test 4: Multiple transformations""" input4 = 'a b nna' transformations4 = [['a', 'b'], [' ', ' '], ['nb', 'bnb']] output4 = 'b b nbnb' self.assertEqual(transform(input4, transformations4), output4)
def test_transform_2(self): """transform Unit test 2: One transformation""" input2 = 'This is a test' transformations2 = [['test', 'test!']] output2 = 'This is a test!' self.assertEqual(transform(input2, transformations2), output2)
def test_transform_3(self): """transform Unit test 3: Multiple transformations""" input3 = 'This is a test' transformations3 = [['is', 'was'], ['test', 'test!']] output3 = 'Thwas was a test!' self.assertEqual(transform(input3, transformations3), output3)
def test_transform_1(self): """transform Unit test 1: No transformations""" input1 = 'This is a test' transformations1 = [] output1 = 'This is a test' self.assertEqual(transform(input1, transformations1), output1)