#12493: tol and optional in doctests don't play well together
------------------------+---------------------------------------------------
Reporter: kcrisman | Owner: mvngu
Type: defect | Status: needs_review
Priority: blocker | Milestone: sage-5.0
Component: doctest | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: John Palmieri
Merged: | Dependencies:
------------------------+---------------------------------------------------
Changes (by newvalueoldvalue):
* status: new => needs_review
* author: => John Palmieri
Old description:
> See [http://groups.google.com/group/sage-
> release/browse_thread/thread/7a3905744b6c6e9f this sage-release thread
> and posts by Marco Streng]. This bug is caused by #10923.
> {{{
> sage -t -only-optional=magma
> "devel/sage/sage/symbolic/integration/integral.py"
> was fine on beta2, but fails on beta3. This file has no magma doctests,
> but does have mathematica and maple doctests. The issue seems to be
> related to the doctesting framework, but I don't see any relevant
> tickets mentioned below. Could someone check whether this test works for
> them?
> Here's the traceback:
> sage -t -only-optional=magma
> "devel/sage/sage/symbolic/integration/integral.py"
> Traceback (most recent call last):
> File "/storage/marco/sage-5.0.beta3/local/bin/sage-doctest", line
> 924, in <module>
> test_file(argv[1], library_code = library_code)
> File "/storage/marco/sage-5.0.beta3/local/bin/sage-doctest", line
> 721, in test_file
> s = extract_doc(file, library_code=library_code)
> File "/storage/marco/sage-5.0.beta3/local/bin/sage-doctest", line
> 551, in extract_doc
> doc = doc_preparse(F[i:j+3])
> File "/storage/marco/sage-5.0.beta3/local/bin/sage-doctest", line
> 370, in doc_preparse
> v = [i for i in range(len(t)) if
> only_optional_include(comment_modifiers[i])]
> IndexError: list index out of range
> [0.1 s]
> }}}
>
> This is verified on several systems.
New description:
See [http://groups.google.com/group/sage-
release/browse_thread/thread/7a3905744b6c6e9f this sage-release thread and
posts by Marco Streng]. This bug is caused by #10923.
{{{
sage -t -only-optional=magma
"devel/sage/sage/symbolic/integration/integral.py"
was fine on beta2, but fails on beta3. This file has no magma doctests,
but does have mathematica and maple doctests. The issue seems to be
related to the doctesting framework, but I don't see any relevant
tickets mentioned below. Could someone check whether this test works for
them?
Here's the traceback:
sage -t -only-optional=magma
"devel/sage/sage/symbolic/integration/integral.py"
Traceback (most recent call last):
File "/storage/marco/sage-5.0.beta3/local/bin/sage-doctest", line
924, in <module>
test_file(argv[1], library_code = library_code)
File "/storage/marco/sage-5.0.beta3/local/bin/sage-doctest", line
721, in test_file
s = extract_doc(file, library_code=library_code)
File "/storage/marco/sage-5.0.beta3/local/bin/sage-doctest", line
551, in extract_doc
doc = doc_preparse(F[i:j+3])
File "/storage/marco/sage-5.0.beta3/local/bin/sage-doctest", line
370, in doc_preparse
v = [i for i in range(len(t)) if
only_optional_include(comment_modifiers[i])]
IndexError: list index out of range
[0.1 s]
}}}
This is verified on several systems.
-----
Apply [attachment:trac_12493.patch] to the scripts repo.
--
Comment:
I think I've found the problem and fixed it, but please test it: try it on
the Sage library, try it on files with doctests which are intentionally
supposed to fail (modify `dummy` above, for instance), both old-fashioned
ones and ones with bad tolerance tests. It works for me, but it needs
much more testing.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12493#comment:11>
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.