def test_1(): sol = Solution() nums = [1, 2, 3] ans = [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]] assert sorted(ans) == sorted(sol.permuteUnique(nums))
def test1(self): num = [-1, -1, 3, -1] s = Solution() rtn = s.permuteUnique(num) print rtn
def test_0(): sol = Solution() assert not sol.permuteUnique([])
def test2(self): num = [1, 1, 2] s = Solution() rtn = s.permuteUnique(num) print rtn