Opened 10 years ago
Closed 8 years ago
#6315 closed defect (fixed)
optional doctest failure -- caused by mistakes in lectures on number theory rst book
Reported by: | was | Owned by: | tbd |
---|---|---|---|
Priority: | major | Milestone: | sage-4.7.2 |
Component: | packages: optional | Keywords: | sd32 |
Cc: | Merged in: | sage-4.7.2.alpha3 | |
Authors: | Mariah Lenox, William Stein | Reviewers: | Marco Streng |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
sage -t -long --optional devel/sage/doc/en/bordeaux_2008/birds_other.rst ********************************************************************** File "/scratch/wstein/build/sage-4.0.2.alpha3/devel/sage-main/doc/en/bordeaux_2008/birds_other.rst", line 243: sage: magma.eval(s) #optional - magma Exception raised: Traceback (most recent call last): File "/scratch/wstein/build/sage-4.0.2.alpha3/local/bin/ncadoctest.py", line 1231, in run_one_test self.run_one_example(test, example, filename, compileflags) File "/scratch/wstein/build/sage-4.0.2.alpha3/local/bin/sagedoctest.py", line 38, in run_one_example OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags) File "/scratch/wstein/build/sage-4.0.2.alpha3/local/bin/ncadoctest.py", line 1172, in run_one_example compileflags, 1) in test.globs File "<doctest __main__.example_6[12]>", line 1, in <module> magma.eval(s) #optional - magma###line 243: sage: magma.eval(s) #optional - magma File "/scratch/wstein/build/sage-4.0.2.alpha3/local/lib/python2.5/site-packages/sage/interfaces/magma.py", line 471, in eval raise RuntimeError, "Error evaluating Magma code.\nIN:%s\nOUT:%s"%(x, ans) RuntimeError: Error evaluating Magma code. IN:time v := [_sage_[3] * _sage_[4] for _ in [1..10^5]]; OUT: >> time v := [_sage_[3] * _sage_[4] for _ in [1..10^5]]; ^ User error: bad syntax ********************************************************************** File "/scratch/wstein/build/sage-4.0.2.alpha3/devel/sage-main/doc/en/bordeaux_2008/birds_other.rst", line 265: sage: magma.eval(s) #optional - magma Expected: 'Time: 1.480' Got: 'Time: 0.210' ********************************************************************** 2 items had failures: 1 of 14 in __main__.example_6 1 of 9 in __main__.example_7 ***Test Failed*** 2 failures. For whitespace errors, see the file /home/wstein/build/sage-4.0.2.alpha3/tmp/.doctest_birds_other.py
Apply
to the Sage library.
Attachments (2)
Change History (10)
Changed 8 years ago by
comment:1 follow-up: ↓ 2 Changed 8 years ago by
- Milestone changed from sage-4.7 to sage-4.7.1
- Report Upstream set to N/A
- Status changed from new to needs_info
comment:2 in reply to: ↑ 1 ; follow-up: ↓ 3 Changed 8 years ago by
Replying to mariah:
[...] I do not know what to do about the difference between the Expected time and the Got time. Timings will be dependent on the computer system.
Why not just append ", random output
" to "#optional - magma
"? That way, the output is ignored, just like the timings in this rst file that don't use magma.
Are the authors of the book aware of this error?
Changed 8 years ago by
comment:3 in reply to: ↑ 2 Changed 8 years ago by
- Status changed from needs_info to needs_review
Replying to mstreng:
Are the authors of the book aware of this error?
The authors "= me" is aware now. I've posted a part2 patch that puts ...'s in for the timings, explains that the doctest is showing the reader *how* to compare timings with Magma (which is good to know how to do easily), and remarks that in fact the timings may change over time.
comment:4 Changed 8 years ago by
comment:5 Changed 8 years ago by
- Reviewers set to Marco Streng
- Status changed from needs_review to positive_review
comment:6 Changed 8 years ago by
- Keywords sd32 added
comment:7 Changed 8 years ago by
- Description modified (diff)
comment:8 Changed 8 years ago by
- Merged in set to sage-4.7.2.alpha3
- Resolution set to fixed
- Status changed from positive_review to closed
trac_6315.patch fixes the "bad syntax" error. However I do not know what to do about the difference between the Expected time and the Got time. Timings will be dependent on the computer system. With the patch, I currently get:
William - what do you want done?