Skip to content

doctest failure in schemes/elliptic_curves/ell_rational_field.py #38813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
mantepse opened this issue Oct 15, 2024 · 1 comment · Fixed by #38824
Closed
2 tasks done

doctest failure in schemes/elliptic_curves/ell_rational_field.py #38813

mantepse opened this issue Oct 15, 2024 · 1 comment · Fixed by #38824

Comments

@mantepse
Copy link
Contributor

Steps To Reproduce

sage -t --random-seed=91390048253425197917505296851335255685 src/sage/schemes/elliptic_curves/ell_rational_field.py
**********************************************************************
File "src/sage/schemes/elliptic_curves/ell_rational_field.py", line 2389, in sage.schemes.elliptic_curves.ell_rational_field.EllipticCurve_rational_field.?
Failed example:
    E.gens(use_database=False, algorithm='pari',pari_effort=4)   # random
Exception raised:
    Traceback (most recent call last):
      File "/home/martin/sage/src/sage/doctest/forker.py", line 714, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/martin/sage/src/sage/doctest/forker.py", line 1144, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.schemes.elliptic_curves.ell_rational_field.EllipticCurve_rational_field.?[4]>", line 1, in <module>
        E.gens(use_database=False, algorithm='pari',pari_effort=Integer(4))   # random
      File "/home/martin/sage/src/sage/schemes/elliptic_curves/ell_rational_field.py", line 2350, in gens
        gens, proved = self._compute_gens(proof, **kwds)
      File "/home/martin/sage/src/sage/schemes/elliptic_curves/ell_rational_field.py", line 2464, in _compute_gens
        raise RuntimeError(f"generators could not be determined. So far we found {ge}. Hint: increase pari_effort.")
    RuntimeError: generators could not be determined. So far we found []. Hint: increase pari_effort.
**********************************************************************
1 item had failures:
   1 of  95 in sage.schemes.elliptic_curves.ell_rational_field.EllipticCurve_rational_field.?
    [884 tests, 1 failure, 24.83 s]
----------------------------------------------------------------------
sage -t --random-seed=91390048253425197917505296851335255685 src/sage/schemes/elliptic_curves/ell_rational_field.py  # 1 doctest failed
----------------------------------------------------------------------
Total time for all tests: 30.0 seconds
    cpu time: 18.2 seconds
    cumulative wall time: 24.8 seconds
Features detected for doctesting: sage.plot,sage.rings.number_field

Expected Behavior

Test should pass

Actual Behavior

Test fails with specific seed

Additional Information

#37293 might be related

Environment

  • OS: Ubuntu 22.04.5 LTS"
  • Sage Version: SageMath version 10.5.beta7, Release Date: 2024-10-12

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@S17A05
Copy link
Member

S17A05 commented Oct 17, 2024

Increasing pari_effort to 5 in line 2389 fixes the issue, but might be too ad-hoc of a solution; also, I guess the test should be marked as a long test.

vbraun pushed a commit to vbraun/sage that referenced this issue Feb 18, 2025
sagemathgh-38824: Turn some doctests in `ell_rational_field.py` into long tests
    
Fixes sagemath#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: sagemath#38824
Reported by: Sebastian A. Spindler
Reviewer(s): Frédéric Chapoton, Sebastian A. Spindler
@vbraun vbraun closed this as completed in 0a278fc Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants