def test_most_popular_characters(self): expected_no_arg_or_arg_5 = ['Spider-Man', 'Captain America', 'Wolverine', 'Iron Man', 'Thor'] expected_arg_3 = expected_no_arg_or_arg_5[:3] self.assertEqual(most_popular_characters(), expected_no_arg_or_arg_5) self.assertEqual(most_popular_characters(5), expected_no_arg_or_arg_5) self.assertEqual(most_popular_characters(3), expected_arg_3)
def test_most_popular_characters_smaller_data_set_and_top_2(): expected = ['Spider-Man', 'Captain America'] actual = most_popular_characters(half_characters, top=2) assert actual == expected
def test_most_popular_characters(): actual = most_popular_characters() expected = ['Spider-Man', 'Captain America', 'Wolverine', 'Iron Man', 'Thor'] assert actual == expected
def test_most_popular_characters(): expected = [ "Spider-Man", "Captain America", "Wolverine", "Iron Man", "Thor" ] assert most_popular_characters() == expected