def test_three_items(self): inputs = [(1, 2, 3), (4, 5, 6), (7, 8, 9)] outputs = {1: (2, 3), 4: (5, 6), 7: (8, 9)} self.assertEqual(dict_from_tuple(inputs), outputs)
def test_four_items(self): inputs = [(1, 2, 3, 4), (5, 6, 7, 8)] outputs = {1: (2, 3, 4), 5: (6, 7, 8)} self.assertEqual(dict_from_tuple(inputs), outputs)