def test_doubleton(self): self.assertEqual([[1, 2], [2, 1]], list(generate_permutations([1, 2])))
def test_triple(self): self.assertEqual( [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]], list(generate_permutations([1, 2, 3])))
def test_singleton(self): self.assertEqual([[1]], list(generate_permutations([1])))