Skip to content

Commit 096daa7

Browse files
committed
add doctest
1 parent 98766c4 commit 096daa7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/sage/rings/polynomial/polynomial_element.pyx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,6 +2159,14 @@ cdef class Polynomial(CommutativePolynomial):
21592159
sage: r = f.any_root()
21602160
sage: r^2 + r
21612161
a^2 + a
2162+
2163+
Check for :issue:`37034` ::
2164+
2165+
sage: R.<x> = Zmod(55)[]
2166+
sage: (x^2 + 1).any_root()
2167+
Traceback (most recent call last):
2168+
...
2169+
ValueError: ...
21622170
"""
21632171
if self.base_ring().is_finite() and self.base_ring().is_field():
21642172
if self.degree() < 0:

0 commit comments

Comments
 (0)