Opened 11 years ago
Closed 11 years ago
#5764 closed defect (fixed)
[with patch, positive review] improve doctest coverage for sageinspect.py
Reported by: | jhpalmieri | Owned by: | jhpalmieri |
---|---|---|---|
Priority: | minor | Milestone: | sage-3.4.1 |
Component: | doctest coverage | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
As the summary says...
Unfortunately, running 'sage -coverage' on this file doesn't yield 100% because it gets confused by, for example, a string containing 'def test1' -- it thinks this is a function without a doctest.
Attachments (1)
Change History (9)
Changed 11 years ago by
comment:1 Changed 11 years ago by
- Summary changed from [with patch, needs review] improve doctest coverage for sageinspect.py to [with patch, needs work] improve doctest coverage for sageinspect.py
comment:2 Changed 11 years ago by
I've tried, and I just can't reproduce this doctest failure. Well, I can, but only by failing to apply one of the patches at #5754: if I apply either both of the patches there or neither of the patches there, I don't see a doctest failure for sagedoc.py. If I only apply the first one, I see the failure here.
comment:3 Changed 11 years ago by
- Summary changed from [with patch, needs work] improve doctest coverage for sageinspect.py to [with patch, needs review] improve doctest coverage for sageinspect.py
comment:4 Changed 11 years ago by
- Summary changed from [with patch, needs review] improve doctest coverage for sageinspect.py to [with patch, needs work] improve doctest coverage for sageinspect.py
The problem is 100% that I forgot to apply the patches at #5754. Thanks. Michael, keep in mind that this ticket depends on #5754.
I think this doctest failure is caused by this patch, since you got rid of a lot of strips.
sage -t devel/sage/sage/server/notebook/cell.py ********************************************************************** File "/scratch/wstein/build/sage-3.4.1.rc2/devel/sage-ref2/sage/server/notebook/cell.py", line 406: sage: C Expected: Cell 0; in=2+3, out=20 Got: Cell 0; in=2+3, out= 20 ********************************************************************** 1 items had failures: 1 of 13 in __main__.example_25 ***Test Failed*** 1 failures. For whitespace errors, see the file /scratch/wstein/build/sage-3.4.1.rc2/tmp/.doctest_cell.py [14.3 s]
Here are some similar failures:
sage -t devel/sage/sage/server/notebook/worksheet.py ********************************************************************** File "/scratch/wstein/build/sage-3.4.1.rc2/devel/sage-ref2/sage/server/notebook/worksheet.py", line 326: sage: W.__repr__() Expected: '[Cell 0; in=2+3, out=5, Cell 10; in=2+8, out=10]' Got: '[Cell 0; in=2+3, out=\n5, Cell 10; in=2+8, out=\n10]' ********************************************************************** File "/scratch/wstein/build/sage-3.4.1.rc2/devel/sage-ref2/sage/server/notebook/worksheet.py", line 2088: sage: W Expected: [Cell 0; in=2+3, out=5, Cell 1; in=2+8, out=10] Got: [Cell 0; in=2+3, out= 5, Cell 1; in=2+8, out= 10] ********************************************************************** File "/scratch/wstein/build/sage-3.4.1.rc2/devel/sage-ref2/sage/server/notebook/worksheet.py", line 2509: sage: v = W.cell_list(); v Expected: [Cell 0; in=2+3, out=5, Cell 1; in=2+8, out=10] Got: [Cell 0; in=2+3, out= 5, Cell 1; in=2+8, out= 10] ********************************************************************** File "/scratch/wstein/build/sage-3.4.1.rc2/devel/sage-ref2/sage/server/notebook/worksheet.py", line 2511: sage: v[0] Expected: Cell 0; in=2+3, out=5 Got: Cell 0; in=2+3, out= 5 ********************************************************************** File "/scratch/wstein/build/sage-3.4.1.rc2/devel/sage-ref2/sage/server/notebook/worksheet.py", line 3863: sage: W.cell_list() Expected: [Cell 0; in=2+3, out=5] Got: [Cell 0; in=2+3, out= 5] ********************************************************************** 4 items had failures: 1 of 7 in __main__.example_7 1 of 8 in __main__.example_70 2 of 7 in __main__.example_79 1 of 11 in __main__.example_99 ***Test Failed*** 5 failures. For whitespace errors, see the file /scratch/wstein/build/sage-3.4.1.rc2/tmp/.doctest_worksheet.py
comment:5 Changed 11 years ago by
- Summary changed from [with patch, needs work] improve doctest coverage for sageinspect.py to [with patch, needs review] improve doctest coverage for sageinspect.py
I don't think I actually changed any code in sageinspect -- just added doctests. I think these errors are actually caused by the patch at #5379. That certainly gets rid of some strips, and after applying the patch here, I don't get failures, but after applying the patch there, I do. I'm changing this one back go "needs review" and I'll mark the other as "needs work".
comment:6 Changed 11 years ago by
Hmm, unless this gets reviewed soon it will probably now make it into 3.4.1, even though it seems quite an important ticket.
Cheers,
Michael
comment:7 Changed 11 years ago by
- Summary changed from [with patch, needs review] improve doctest coverage for sageinspect.py to [with patch, positive review] improve doctest coverage for sageinspect.py
comment:8 Changed 11 years ago by
- Resolution set to fixed
- Status changed from new to closed
Merged in Sage 3.4.1.rc3.
Cheers,
Michael
I thought this already got dealt with. Anyways, right now doctests fail on the sagedoc.py file (and no others).