def test_perpender_umm(self): test_list = ["Python", "is", "better", "than", "JavaScript"] test_prefix = "Umm... " expected_value = [ 'Umm... Python', 'Umm... is', 'Umm... better', 'Umm... than', 'Umm... JavaScript' ] prepender(test_list, test_prefix) self.assertEqual(expected_value, test_list)
def test_prepender_positive_list_length_non_empty_string(self): actual = prepender(["Python", "is", "better", "than", "JavaScript"], "Umm... ") expected = [ 'Umm... Python', 'Umm... is', 'Umm... better', 'Umm... than', 'Umm... JavaScript' ] self.assertEqual(expected, actual)
def test_prepender_list_with_multiple_strings_and_non_empty_string(self): actual_value = prepender( ["Python", "is", "better", "than", "JavaScript"], "Umm... ") expected_value = [ "Umm... Python", "Umm... is", "Umm... better", "Umm... than", "Umm... JavaScript" ] self.assertEqual(actual_value, expected_value)
def test_prepender_empty_list_empty_string(self): actual = prepender([], "") expected = [] self.assertEqual(expected, actual)
def test_prepender_positive_list_length_empty_string(self): actual = prepender(["Python", "is", "better", "than", "JavaScript"], "") expected = ['Python', 'is', 'better', 'than', 'JavaScript'] self.assertEqual(expected, actual)
def test_prepender_list_length_one_non_empty_string(self): actual = prepender(["Python"], "I love ") expected = ['I love Python'] self.assertEqual(expected, actual)
def test_prepender_non_empty_list_empty_string(self): actual = prepender(["Python"], "") expected = ['Python'] self.assertEqual(expected, actual)
def test_prepender_empty_list_and_empty_string(self): actual_value = prepender([], "") expected_value = [] self.assertEqual(actual_value, expected_value)
def test_prepender_non_empty_list_and_non_empty_string(self): actual_value = prepender(["Python"], "I love ") expected_value = ["I love Python"] self.assertEqual(actual_value, expected_value)
def test_perpender_python(self): test_list = ["Python"] test_prefix = "" expected_value = ["Python"] prepender(test_list, test_prefix) self.assertEqual(expected_value, test_list)
def test_perpender_empty_with_prefix(self): test_list = [] test_prefix = "Python" expected_value = [] prepender(test_list, test_prefix) self.assertEqual(expected_value, test_list)
def test_perpender_none(self): test_list = [] test_prefix = "" expected_value = [] prepender(test_list, test_prefix) self.assertEqual(expected_value, test_list)
def test_perpender_numbers(self): test_list = [1, 2, 3, 4, 5] test_prefix = 7 expected_value = [8, 9, 10, 11, 12] prepender(test_list, test_prefix) self.assertEqual(expected_value, test_list)
def test_perpender_list_with_no_prefix(self): test_list = ["Python", "is", "better", "than", "JavaScript"] test_prefix = "" expected_value = ["Python", "is", "better", "than", "JavaScript"] prepender(test_list, test_prefix) self.assertEqual(expected_value, test_list)
def test_perpender_Pythonic_love(self): test_list = ["Python"] test_prefix = "I Love " expected_value = ["I Love Python"] prepender(test_list, test_prefix) self.assertEqual(expected_value, test_list)