#14272: Add DocTestFinder to the doctesting framework
-------------------------------------+--------------------------------------
Reporter: roed | Owner: roed
Type: defect | Status: new
Priority: major | Milestone: sage-5.10
Component: doctest framework | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: #12415 | Stopgaps:
-------------------------------------+--------------------------------------
Changes (by andrew.mathas):
* cc: andrew.mathas (added)
Comment:
All of these doctests appear in a string which is passed as an argument to
the GlobalOptions class. For example, here is part of the "problem" in
partition.py:
{{{
PartitionOptions=GlobalOptions(name='partitions',
doc=r"""
Sets and displays the global options for elements of the partition,
skew
partition, and partition tuple classes. If no parameters are set,
then the
function returns a copy of the options dictionary.
The ``options`` to partitions can be accessed as the method
:obj:`Partitions.global_options` of :class:`Partitions` and
related parent classes.
""",
end_doc=r"""
EXAMPLES::
sage: P = Partition([4,2,2,1])
sage: P
[4, 2, 2, 1]
sage: Partitions.global_options(display="exp")
sage: P
1, 2^2, 4
sage: Partitions.global_options(display="exp_high")
sage: P
4, 2^2, 1
*snip*
}}}
The string ``end_doc`` contains all of the untested doc-tests but it is an
argument being passed to a class rather than a documentation string. This
string will become part of the doc-string for the associated options
classes for partitions (resp. tableaux), so doc-testing it would be a good
idea.
Arguably, however, doc-tests should **not** be performed on hard coded
strings in the code unless they are actually doc-strings. It is not clear
to me how to fix this problem or even if it should be fixed.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14272#comment:3>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.