#11615: optional doctests: clean up and document "known bug", "optional:
requires
PKG"
---------------------------+------------------------------------------------
Reporter: jhpalmieri | Owner: mvngu
Type: enhancement | Status: needs_review
Priority: minor | Milestone: sage-4.7.2
Component: doctest | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: John Palmieri
Merged: | Dependencies:
---------------------------+------------------------------------------------
Comment(by jhpalmieri):
By the way, the patch to the scripts library also fixes a bug: if you have
a doctest marked
{{{
sage: 2+2 # optional: pkg1 pkg2
17
}}}
and run `sage -t -only-optional=pkg1,pkg2 ...`, the test would not be run:
the function `only_optional_include` in sage-doctest would convert "pkg1
pkg2" to "pkg1pkg2" with no spaces, so it would only be run with `sage -t
-optional` or `sage -t -only-optional=pkg1pkg2`. With the new version,
the string gets converted to `'pkg1,pkg2'`, and then split into `['pkg1',
'pkg2']`.
Previously, you could use the undocumented
{{{
sage: 2+2 # optional: pkg1,pkg2
17
}}}
and it would work. With the patch, this no longer works unless there is
white space between pkg1 and pkg2 (commas are still allowed). I couldn't
find any instances of tags separated by commas but no spaces in the Sage
library. The patch to the Sage library clarifies the documentation,
saying that you need spaces between the package names.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11615#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.