#14272: Add DocTestFinder to the doctesting framework
-----------------------+----------------------------------------------------
Reporter: roed | Owner: mvngu
Type: defect | Status: new
Priority: major | Milestone: sage-5.9
Component: doctest | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
-----------------------+----------------------------------------------------
We should use Python's
[http://docs.python.org/2/library/doctest.html#doctest.DocTestFinder
DocTestFinder] to generate doctests from Python files: our current
approach misses some doctests that are added dynamically:
{{{
sage: from sage.doctest.sources import FileDocTestSource
sage: os.chdir(os.path.join(os.environ['SAGE_ROOT'],'devel','sage'))
sage: filename1 = 'sage/combinat/partition.py'
sage: FDS1 = FileDocTestSource(filename1, True, True, True, False)
sage: filename2 = 'sage/combinat/tableau.py'
sage: FDS2 = FileDocTestSource(filename2, True, True, True, False)
sage: FDS1._test_enough_doctests()
There are 18 tests in sage/combinat/partition.py that are not being run
Tests on lines 315, 316, 318, 319, 321, 322, 328, 330, 332, 333, 338,
339, 348, 349, 352, 353, 358, 361 are not run
sage: FDS2._test_enough_doctests()
There are 12 tests in sage/combinat/tableau.py that are not being run
Tests on lines 120, 121, 123, 124, 127, 128, 135, 136, 140, 141, 145,
148 are not run
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14272>
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.