id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
12815 bugs in doctesting script for examples with tolerance mstreng mvngu "1. When testing the file
{{{
""""""
EXAMPLES:
The name blah is undefined::
sage: blah+blah
blahblah
Here's a doctest that is out of tolerance::
sage: 100+10000000000 # abs tol 0.1
10000000000
sage: 1+1
2
""""""
}}}
I get
{{{
File ""/Users/marcostreng/tmp/test.sage"", line 6:
sage: blah+blah
Out of tolerance 10000000000.0 vs 10000000100.0
}}}
So the error of ""blah is undefined"" is not printed, while the ""out of tolerance"" is printed for the wrong test.
2. Also, there is a bug when a test with tolerance is the last test:
{{{
""""""
EXAMPLES:
Doctests with tolerance cannot be followed by empty lines::
sage: 100+10000000000 # rel tol 0.1
10000000000
""""""
}}}
yields
{{{
File ""/Users/marcostreng/.sage//tmp/test_71331.py"", line 58
... ''', res, 0.1, 're
^
SyntaxError: invalid syntax
}}}
3. The following is documented to work, but actually doesn't work:
{{{
""""""
sage: 1e16 # relative tol 1e-10
10^16
""""""
}}}
Testing this gives
{{{
sage -t ""/home/jdemeyer/doctest/tolerance_fail.py""
**********************************************************************
File ""/home/jdemeyer/doctest/tolerance_fail.py"", line 2:
sage: 1e16 # relative tol 1e-10
Expected '
10^16
' got '1.00000000000000e16'
**********************************************************************
}}}" defect closed critical sage-5.7 doctest coverage fixed tolerance doctest jhpalmieri kcrisman sage-5.7.beta0 Jeroen Demeyer Robert Bradshaw N/A #12493, #13899