id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
12069 fix doctesting of .sage files jhpalmieri mvngu "Trac #9739 broke doctesting of .sage files (as in `sage -t my_file.sage`). The attached patch fixes this.
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. (Actually we produced the preparsed version, but then overwrote it with the file containing the doctesting framework.)
I 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.
At 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 it can't find the file, it skips it and goes on to the next one.
Apply
- [attachment:trac_12069-doctest.patch] to the scripts repo,
- [attachment:trac_12069-sage.patch] to the Sage library." defect closed critical sage-5.0 doctest coverage fixed doctest leif jdemeyer sage-5.0.beta11 John Palmieri Francis Clarke N/A