Opened 10 years ago
Last modified 9 years ago
#12415 closed enhancement
Update doctesting framework — at Version 22
Reported by: | robertwb | Owned by: | mvngu |
---|---|---|---|
Priority: | major | Milestone: | sage-5.9 |
Component: | doctest framework | Keywords: | |
Cc: | kini, ohanar, jhpalmieri | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #13147,#13146, #13145, #12723, #12392, #12393, #12395, #12396, #12397, #12381, #12382, #12383, #12384 | Stopgaps: |
Description (last modified by )
There are several improvements that would be good to make, including but not limited to:
- Forking rather than starting up a new Sage each time.
- Customizable comparison rather than mutating doctests into new doctests (e.g. followup to #10952).
- Eliminate need to write temporary files for every doctested file.
- Constant headaches caused by the difference in doctesting library vs. non-library files.
- The ability to drop into a debugger if a doctest raises an exception.
Robert's code is at
http://code.google.com/p/sagemath-timer/
and does most of the above (plus more which has been moved to followup tickets #12720 and #12722)
Apply attachment:12415_stderr_vs_51b5.patch, attachment:12415_doctest_fixes.patch, attachment:12415_framework.patch
Apply attachment:12415_script.patch to the scripts repo
Apply attachment:12415_sagenb_fixes.patch to the sagenb repo (fixes doctest errors)
Apply attachment:12415_spkg_bin_sage.patch to $SAGE_ROOT/spkg/bin/sage
(there's no repo here so you need to use patch)
Change History (22)
comment:1 Changed 10 years ago by
- Description modified (diff)
comment:2 Changed 10 years ago by
- Description modified (diff)
comment:3 Changed 10 years ago by
- Description modified (diff)
comment:4 Changed 10 years ago by
- Description modified (diff)
comment:5 Changed 10 years ago by
- Description modified (diff)
comment:6 Changed 10 years ago by
- Dependencies set to #12392, #12393, #12395, #12396, #12397, #12381, #12382, #12383, #12384
comment:7 Changed 10 years ago by
- Dependencies changed from #12392, #12393, #12395, #12396, #12397, #12381, #12382, #12383, #12384 to #12723, #12392, #12393, #12395, #12396, #12397, #12381, #12382, #12383, #12384
comment:8 Changed 10 years ago by
- Cc kini added
comment:9 Changed 10 years ago by
12415_2.patch seems to contain a lot of tempfile changes, could you split out the doctest changes into a separate patch (or are these affecting doctests?)
comment:10 Changed 10 years ago by
- Cc ohanar added
comment:11 Changed 10 years ago by
apparently even I forget my trac username is not what it should be
comment:12 Changed 10 years ago by
- Dependencies changed from #12723, #12392, #12393, #12395, #12396, #12397, #12381, #12382, #12383, #12384 to #13145, #12723, #12392, #12393, #12395, #12396, #12397, #12381, #12382, #12383, #12384
comment:13 Changed 10 years ago by
- Dependencies changed from #13145, #12723, #12392, #12393, #12395, #12396, #12397, #12381, #12382, #12383, #12384 to #13146, #13145, #12723, #12392, #12393, #12395, #12396, #12397, #12381, #12382, #12383, #12384
comment:14 Changed 10 years ago by
- Dependencies changed from #13146, #13145, #12723, #12392, #12393, #12395, #12396, #12397, #12381, #12382, #12383, #12384 to #13147,#13146, #13145, #12723, #12392, #12393, #12395, #12396, #12397, #12381, #12382, #12383, #12384
comment:15 Changed 10 years ago by
I've moved the patches dealing with temporary files to #13147.
comment:16 Changed 10 years ago by
- Cc jhpalmieri added
comment:17 Changed 10 years ago by
- Description modified (diff)
comment:18 Changed 10 years ago by
- Description modified (diff)
comment:19 Changed 10 years ago by
- Status changed from new to needs_review
Ready for review!
There are still a few known issues:
- valgrinding under sage -t doesn't work. I haven't used valgrind much and don't know how to resolve this.
- The fix at #13147 probably needs work: I'm getting a failure in
sage.rings.polynomial.multi_polynomial_libsingular
to do with garbage collection. I'm working on it. - I'm in the process of updating the developer guide.
But I wanted to get some other people involved in reviewing.
comment:20 Changed 10 years ago by
This may be a silly question, but how do I use the new framework? Don't we need changes to the scripts repo, too? (If I just run sage -t FILES
, I don't see the various messages, like Doctesting ...
, that should be printed by run_doctests
are not printed, so sage -t
is not yet using the new framework.)
One of the patches also didn't apply cleanly to 5.1.beta5:
hg qimport -P ~/Downloads/12415_stderr.patch adding 12415_stderr.patch to series file applying 12415_stderr.patch patching file sage/lfunctions/lcalc.py Hunk #1 FAILED at 226 1 out of 2 hunks FAILED -- saving rejects to file sage/lfunctions/lcalc.py.rej patch failed, unable to continue (try -v) patch failed, rejects left in working dir errors during apply, please fix and refresh 12415_stderr.patch
comment:21 Changed 10 years ago by
comment:22 Changed 10 years ago by
- Description modified (diff)
I'm working on this. E-mail me if you want to collaborate.