def test_roots_rational(): assert roots_rational(Poly(x**2-1, x)) == [-S.One, S.One] assert roots_rational(Poly(x**2-x, x)) == [S.Zero, S.One] assert roots_rational(Poly(x**2-x/2, x)) == [S.Zero] assert roots_rational(Poly(2*x**2-x, x)) == [S.Zero] assert roots_rational(Poly(t*x**2-x, x)) == []
def test_roots_rational(): assert roots_rational(Poly(x**2 - 1, x)) == [-S.One, S.One] assert roots_rational(Poly(x**2 - x, x)) == [S.Zero, S.One] assert roots_rational(Poly(x**2 - x / 2, x)) == [S.Zero] assert roots_rational(Poly(2 * x**2 - x, x)) == [S.Zero] assert roots_rational(Poly(t * x**2 - x, x)) == []