How to run a test file?

asked 2022-06-30 21:57:27 +0200

raine gravatar image

updated 2022-07-03 03:53:03 +0200

Hello, I'm trying to run a test file,, that tests the functionality of another file in sage's source code. itself is not in sage's source code, but the file I'm testing is. Where should I put the test file, and which command should I use in order to run it? So far what I've tried is putting the file in sage's src folder and running the command "./sage", but the first line of the test file is "from sage.schemes.hyperelliptic_curves import jacobian_morphism", which produces this error:

Traceback (most recent call last):
  File "/mnt/c/Users/Raine/sage/", line 1, in <module>
    from sage.schemes.hyperelliptic_curves import jacobian_morphism
  File "/mnt/c/Users/Raine/sage/src/sage/schemes/hyperelliptic_curves/", line 119, in <module>
    from sage.schemes.generic.morphism import SchemeMorphism
  File "/mnt/c/Users/Raine/sage/src/sage/schemes/generic/", line 84, in <module>
    from sage.rings.fraction_field_element import FractionFieldElement
  File "sage/rings/fraction_field_element.pyx", line 26, in init sage.rings.fraction_field_element
  File "sage/rings/integer_ring.pyx", line 1, in init sage.rings.integer_ring
  File "sage/rings/integer.pyx", line 1, in init sage.rings.integer
  File "sage/rings/rational.pyx", line 79, in init sage.rings.rational
ImportError: cannot import name ZZ

Is there anything I haven't set up properly? Thank you!

edit retag flag offensive close merge delete


Instead of



./sage -t
slelievre gravatar imageslelievre ( 2022-07-04 08:11:49 +0200 )edit