Changes between Version 1 and Version 4 of Ticket #12069


Ignore:
Timestamp:
11/22/11 19:42:31 (11 years ago)
Author:
jhpalmieri
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12069 – Description

    v1 v4  
    11Trac #9739 broke doctesting of .sage files (as in `sage -t my_file.sage`).  The attached patch fixes this.
    22
    3 The problem was that before #9739, doctesting `file.sage` produced two Python files: a preparsed version of `file.sage`, and a file with the doctesting framework and the doctests, but not the actual Python/Sage code -- it just included a line like `from file import *`.  In #9739, we missed this, and we just produced one Python file, the second one, so the original Python/Sage code is nowhere to be found, and thus not importable.
     3The problem was that before #9739, doctesting `file.sage` produced two Python files: a preparsed version of `file.sage`, and a file with the doctesting framework and the doctests, but not the actual Python/Sage code -- it just included a line like `from file import *`.  In #9739, we missed this, and we just produced one Python file, the second one, so the original Python/Sage code is nowhere to be found, and thus not importable.  (Actually we produced the preparsed version, but then overwrote it with the file containing the doctesting framework.)
     4
     5I think the same was happening with non-library Python files -- there should have been two Python files created, but sage-doctest was creating one and then overwriting it.  The patch fixes this, too.
    46
    57At the same time, this patch fixes a small bug in the function `delete_tmpfiles`: the function used to quit completely if it couldn't find some file in the list `tmpfiles`.  Now if if can't find the file, it skips it and goes on to the next one.
    68
    7 Apply [attachment:trac_12069-doctest.patch] to the scripts repo.
     9Apply
     10
     11 - [attachment:trac_12069-doctest.patch] to the scripts repo,
     12 - [attachment:trac_12069-sage.patch] to the Sage library.