File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -7098,12 +7098,26 @@ def exactify(self):
70987098 sage: cp.exactify()
70997099 sage: cp._exact
71007100 True
7101+
7102+ TESTS:
7103+
7104+ Check that interrupting ``exactify()`` does not lead to incoherent state::
7105+
7106+ sage: x = polygen(AA)
7107+ sage: p = AA(2)^(1/100) * x + AA(3)^(1/100)
7108+ sage: cp = AA.common_polynomial(p)
7109+ sage: alarm(0.5); cp.generator()
7110+ Traceback (most recent call last):
7111+ ...
7112+ AlarmInterrupt
7113+ sage: alarm(0.5); cp.generator()
7114+ Traceback (most recent call last):
7115+ ...
7116+ AlarmInterrupt
71017117 """
71027118 if self ._exact :
71037119 return
71047120
7105- self ._exact = True
7106-
71077121 if self ._poly .base_ring () is QQ :
71087122 self ._factors = [fac_exp [0 ] for fac_exp in self ._poly .factor ()]
71097123 self ._gen = qq_generator
@@ -7128,6 +7142,8 @@ def exactify(self):
71287142
71297143 self ._factors = [fac_exp [0 ] for fac_exp in fp .factor ()]
71307144
7145+ self ._exact = True
7146+
71317147 def factors (self ):
71327148 r"""
71337149 EXAMPLES::
You can’t perform that action at this time.
0 commit comments