Skip to content

Commit ea2ae54

Browse files
author
Release Manager
committed
gh-39567: Make test deterministic to fix CI Apparently the test is introduced in #38824 and it's basically copied from another test below that is marked `random` ``` sage: E = EllipticCurve([-127^2,0]) sage: E.gens(use_database=False, algorithm='pari', pari_effort=4) # long time, random [(611429153205013185025/9492121848205441 : 15118836457596902442737698070880/924793900700594415341761 : 1)] ``` I don't know why this one isn't marked `# random` but I choose to keep checking the output but does it more carefully. Basically it has rank 1 so the generator is determined up to `± 1` and modulo torsion, so we just need to check `l[0] - a` or `l[0] + a` is in torsion. It's not clear why the test starts failing now. Maybe it's just random after all. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #39567 Reported by: user202729 Reviewer(s): Frédéric Chapoton
2 parents 2b58d81 + e0ffbf3 commit ea2ae54

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/sage/schemes/elliptic_curves/ell_rational_field.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2354,12 +2354,14 @@ def gens(self, proof=None, **kwds):
23542354
sage: set(E.gens()) <= set([P,-P])
23552355
True
23562356
2357-
Check that :issue:`38813` has been fixed:
2357+
Check that :issue:`38813` has been fixed::
23582358
2359-
sage: set_random_seed(91390048253425197917505296851335255685)
2359+
sage: # long time
23602360
sage: E = EllipticCurve([-127^2,0])
2361-
sage: E.gens(use_database=False, algorithm='pari', pari_effort=4) # long time
2361+
sage: l = E.gens(use_database=False, algorithm='pari', pari_effort=4); l # random
23622362
[(611429153205013185025/9492121848205441 : 15118836457596902442737698070880/924793900700594415341761 : 1)]
2363+
sage: a = E(611429153205013185025/9492121848205441, 15118836457596902442737698070880/924793900700594415341761)
2364+
sage: assert len(l) == 1 and ((l[0] - a).is_finite_order() or (l[0] + a).is_finite_order())
23632365
"""
23642366
if proof is None:
23652367
from sage.structure.proof.proof import get_flag

0 commit comments

Comments
 (0)