Skip to content

Commit 0a278fc

Browse files
author
Release Manager
committed
gh-38824: Turn some doctests in `ell_rational_field.py` into long tests Fixes #38813 Some of the doctests in `ell_rational_field.py` ran into RuntimeErrors and couldn't compute generators in time, causing tests to fail. Turning them into long tests (which is necessary since they have to run longer in some cases) fixes that problem. Also added some missing spaces. URL: #38824 Reported by: Sebastian A. Spindler Reviewer(s): Frédéric Chapoton, Sebastian A. Spindler
2 parents c43cd23 + aeb512f commit 0a278fc

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/sage/schemes/elliptic_curves/ell_rational_field.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ def mwrank(self, options=''):
444444
EXAMPLES::
445445
446446
sage: E = EllipticCurve('37a1')
447-
sage: E.mwrank() #random
447+
sage: E.mwrank() # random
448448
...
449449
sage: print(E.mwrank())
450450
Curve [0,0,1,-1,0] : Basic pair: I=48, J=-432
@@ -2335,7 +2335,7 @@ def gens(self, proof=None, **kwds):
23352335
over Rational Field
23362336
sage: E1.gens() # random (if database not used)
23372337
[(-400 : 8000 : 1), (0 : -8000 : 1)]
2338-
sage: E1.gens(algorithm='pari') #random
2338+
sage: E1.gens(algorithm='pari') # random
23392339
[(-400 : 8000 : 1), (0 : -8000 : 1)]
23402340
23412341
TESTS::
@@ -2353,6 +2353,13 @@ def gens(self, proof=None, **kwds):
23532353
sage: P = E.lift_x(10/9)
23542354
sage: set(E.gens()) <= set([P,-P])
23552355
True
2356+
2357+
Check that :issue:`38813` has been fixed:
2358+
2359+
sage: set_random_seed(91390048253425197917505296851335255685)
2360+
sage: E = EllipticCurve([-127^2,0])
2361+
sage: E.gens(use_database=False, algorithm='pari', pari_effort=4) # long time
2362+
[(611429153205013185025/9492121848205441 : 15118836457596902442737698070880/924793900700594415341761 : 1)]
23562363
"""
23572364
if proof is None:
23582365
from sage.structure.proof.proof import get_flag
@@ -2405,14 +2412,15 @@ def _compute_gens(self, proof,
24052412
True
24062413
24072414
sage: E = EllipticCurve([-127^2,0])
2408-
sage: E.gens(use_database=False, algorithm='pari',pari_effort=4) # random
2415+
sage: E.gens(use_database=False, algorithm='pari', pari_effort=4) # long time, random
24092416
[(611429153205013185025/9492121848205441 : 15118836457596902442737698070880/924793900700594415341761 : 1)]
24102417
24112418
TESTS::
24122419
2420+
sage: E = EllipticCurve([-127^2,0])
24132421
sage: P = E.lift_x(611429153205013185025/9492121848205441)
2414-
sage: ge = set(E.gens(use_database=False, algorithm='pari',pari_effort=4))
2415-
sage: ge <= set([P+T for T in E.torsion_points()]
2422+
sage: ge = set(E.gens(use_database=False, algorithm='pari',pari_effort=4)) # long time
2423+
sage: ge <= set([P+T for T in E.torsion_points()] # long time
24162424
....: + [-P+T for T in E.torsion_points()])
24172425
True
24182426
"""

0 commit comments

Comments
 (0)