def test_when_three_men_and_women(self): self.assertEqual( gale_shapley([[2, 0, 1], [0, 2, 1], [0, 1, 2]], [[0, 2, 1], [2, 0, 1], [0, 1, 2]]), ([2, 1, 0], [2, 1, 0]))
def test_when_one_man_and_woman(self): self.assertEqual(gale_shapley([[0]], [[0]]), ([0], [0]))
def test_when_two_men_and_women(self): self.assertEqual(gale_shapley([[0, 1], [0, 1]], [[1, 0], [0, 1]]), ([1, 0], [1, 0]))
def test_when_preferences_lists_are_empty(self): self.assertEqual(gale_shapley([], []), ([], []))