Opened 8 years ago

Last modified 7 years ago

## #12815 closed defect

# bugs in doctesting script for examples with tolerance — at Initial Version

Reported by: | mstreng | Owned by: | mvngu |
---|---|---|---|

Priority: | critical | Milestone: | sage-5.7 |

Component: | doctest coverage | Keywords: | tolerance doctest |

Cc: | jhpalmieri, kcrisman | Merged in: | |

Authors: | Reviewers: | ||

Report Upstream: | N/A | Work issues: | |

Branch: | Commit: | ||

Dependencies: | 12493 | Stopgaps: |

### Description

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.

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

**Note:**See TracTickets for help on using tickets.