def test_dup_real_imag(): assert dup_real_imag([], ZZ) == ([[]], [[]]) assert dup_real_imag([1], ZZ) == ([[1]], [[]]) assert dup_real_imag([1, 1], ZZ) == ([[1], [1]], [[1, 0]]) assert dup_real_imag([1, 2], ZZ) == ([[1], [2]], [[1, 0]]) assert dup_real_imag([1, 2, 3], ZZ) == ([[1], [2], [-1, 0, 3]], [[2, 0], [2, 0]]) raises(DomainError, "dup_real_imag([EX(1), EX(2)], EX)")
def test_dup_real_imag(): assert dup_real_imag([], ZZ) == ([[]], [[]]) assert dup_real_imag([1], ZZ) == ([[1]], [[]]) assert dup_real_imag([1,1], ZZ) == ([[1], [1]], [[1,0]]) assert dup_real_imag([1,2], ZZ) == ([[1], [2]], [[1,0]]) assert dup_real_imag([1,2,3], ZZ) == ([[1], [2], [-1,0,3]], [[2,0], [2,0]]) raises(DomainError, "dup_real_imag([EX(1), EX(2)], EX)")