#10983: new doctest for french book about Sage
---------------------------------+------------------------------------------
Reporter: casamayou | Owner: mvngu
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.8
Component: doctest | Keywords:
Work_issues: | Upstream: N/A
Reviewer: Dmitrii Pasechnik | Author: Alexandre Casamayou
Merged: | Dependencies:
---------------------------------+------------------------------------------
Comment(by casamayou):
Replying to [comment:16 jdemeyer]:
> Replying to [comment:15 dimpase]:
> > Perhaps there is also a way to have several independent tests in one
file, I don't know.
>
> Of course you can have several independent tests in one file, just like
you can have more than one function or more than one class in a file.
Just put several test blocks in the file:
Attached you will find the test files corrected.
The too long tests were commented: # long time
Does that sound correct ?
Here are the execution time :
{{{
$ for i in *.py ; do sage -t $i; done;
sage -t "calculus_fixed.py"
[11.2 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 11.2 seconds
sage -t "graphique_1_fixed.py"
[14.9 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 15.0 seconds
sage -t "graphique_2_fixed.py"
[19.4 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 19.4 seconds
sage -t "graphique_3_fixed.py"
[8.3 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 8.4 seconds
sage -t "sol_calculus_fixed.py"
[8.9 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 9.0 seconds
sage -t "sol_graphiques_1_fixed.py"
[13.0 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 13.1 seconds
sage -t "sol_graphiques_2_fixed.py"
[4.8 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 4.8 seconds
}}}
And with the long tests :
{{{
$ for i in *.py ; do sage -t -long $i; done;
sage -t -long "calculus_fixed.py"
[11.2 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 11.3 seconds
sage -t -long "graphique_1_fixed.py"
[323.1 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 323.1 seconds
sage -t -long "graphique_2_fixed.py"
[20.3 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 20.3 seconds
sage -t -long "graphique_3_fixed.py"
[8.1 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 8.1 seconds
sage -t -long "sol_calculus_fixed.py"
[8.9 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 9.0 seconds
sage -t -long "sol_graphiques_1_fixed.py"
[47.3 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 47.3 seconds
sage -t -long "sol_graphiques_2_fixed.py"
[64.9 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 65.0 seconds
}}}
It was the execution of the following instruction that is very long :
{{{
sage: f = lambda x, y : (abs(cos((x + I * y) ** 4)) - 1)
sage: g2 = implicit_plot(f, (-3, 3), (-3, 3), plot_points=400) # long time
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10983#comment:17>
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.