Changes between Initial Version and Version 14 of Ticket #12341

Feb 25, 2012, 5:08:58 PM (11 years ago)

Replying to cremona:

I have not checked all the logic in the revised code.

I don't think I have explained the issue that this ticket fixes very clearly (which was exposed when running one of the optional doctests without having the optional spkg installed). There are 2 main issues that caused this:

  • When calling CremonaDatabase('name') the file SAGE_ROOT/data/cremona/name.db was being touched, something that is bad in general if the file wasn't there to start with.
  • When calling CremonaDatabase(), to determine if the full database is installed, it would check for the existence of SAGE_ROOT/data/cremona/cremona.db rather than use one of the functions in sage.misc for this purpose.

With these combined, running the optional doctests would break the cremona database: it would run CremonaDatabase('cremona'), which would touch SAGE_ROOT/data/cremona/cremona.db and thus later calls of CremonaDatabase() would break since it would think the full cremona database was installed and try to use the touched file.

I was puzzled by the remark about testing with flag --optional since I thought that only made sense with some sensible string after the word "optional", e.g. "magma".

Unless you want to test all optional packages (which could be useful for a giant system install -- unfortunately there are a few optional packages that don't want to build properly at the moment).

But it seems that there are doctest lines which are tagged "# optional" with no mention of which optional package is relevant.

I consider this a bug and something that should be required for any optional tags.


  • Ticket #12341

    • Property Priority changed from major to critical
    • Property Status changed from new to needs_review
    • Property Reviewers changed from to John Cremona
    • Property Authors changed from to R. Andrew Ohana
  • Ticket #12341 – Description

    initial v14  
    5151Total time for all tests: 4.3 seconds
     56See comment:14 for an explanation of the issues causing this.
     60Apply attachment:trac12341.patch to the Sage Library.