#6908: [with patch, needs review] programmers' guide --- doctesting and parallel
doctesting
---------------------------+------------------------------------------------
Reporter: mvngu | Owner: tba
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.1.2
Component: documentation | Keywords:
Reviewer: | Author: Minh Van Nguyen
Merged: |
---------------------------+------------------------------------------------
Comment(by mvngu):
Replying to [comment:3 jhpalmieri]:
> line 93:
{{{
[mv...@mod sage-4.1.1]$ sage devel/sage-main/sage/games/sudoku.py
}}}
> is missing "-t".
Fixed. That example shouldn't be there.
[[BR]][[BR]]
> I don't understand this example, though. If I do {{{./sage -t
devel/sage/sage/games/sudoku.py}}}, it works. If I use the system version
instead -- {{{sage -t devel/...}}} -- I get
> {{{
> (sage-4.1.2.alpha1-64bit) [10:48]$ sage -t
devel/sage/sage/games/sudoku.py
> sage -t
"builds/sage-4.1.2.alpha1-64bit/devel/sage/sage/games/sudoku.py"
> File "./sudoku.py", line 18
> from devel/sage/sage/games/sudoku import *
> ^
> SyntaxError: invalid syntax
>
> [1.0 s]
> }}}
> If you can reproduce this error, perhaps it should be included also?
I don't know how to reproduce that error. With Sage 4.1.1, I got this:
{{{
[mv...@sage sage-4.1.1]$ ./sage -t devel/sage/sage/games/sudoku.py
sage -t "devel/sage/sage/games/sudoku.py"
[4.9 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 4.9 seconds
[mv...@sage sage-4.1.1]$ sage -t devel/sage/sage/games/sudoku.py
Traceback (most recent call last):
File "/usr/local/sage/local/bin/sage-test", line 49, in <module>
os.makedirs(TMP)
File "/usr/local/sage/local/lib/python/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/sage/tmp/tmp'
}}}
With Sage 4.1.2.alpha1, I got this:
{{{
[mv...@sage sage-4.1.2.alpha1]$ ./sage -t devel/sage/sage/games/sudoku.py
sage -t "devel/sage/sage/games/sudoku.py"
[5.4 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 5.4 seconds
[mv...@sage sage-4.1.2.alpha1]$ sage -t devel/sage/sage/games/sudoku.py
Traceback (most recent call last):
File "/usr/local/sage/local/bin/sage-test", line 49, in <module>
os.makedirs(TMP)
File "/usr/local/sage/local/lib/python/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/sage/tmp/tmp'
}}}
In both cases, using a system-wide Sage resulted in permission error.
[[BR]][[BR]]
> (By the way, the only way I've found to doctest a .py file (for example)
in a different build of Sage, or completely outside the Sage library, is
to cd to the actual directory containing the file and then running {{{sage
-t sudoku.py}}}.)
Yes, if you're using a local Sage installation, not a system-wide one:
{{{
[mv...@sage sage-4.1.1]$ cd devel/sage-main/sage/games/
[mv...@sage games]$ ls
all.py __init__.py sudoku_backtrack.pyx
hexad.py sudoku_backtrack.c sudoku.py
[mv...@sage games]$ pwd
/scratch/mvngu/build/sage-4.1.1/devel/sage-main/sage/games
[mv...@sage games]$ /scratch/mvngu/build/sage-4.1.1/sage -t sudoku.py
sage -t "devel/sage-main/sage/games/sudoku.py"
[5.1 s]
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 5.1 seconds
[mv...@sage games]$ sage -t sudoku.py
Traceback (most recent call last):
File "/usr/local/sage/local/bin/sage-test", line 49, in <module>
os.makedirs(TMP)
File "/usr/local/sage/local/lib/python/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/sage/tmp/tmp'
}}}
[[BR]][[BR]]
> Lines 134-135 have a line break which shouldn't be there.
Fixed.
[[BR]][[BR]]
Replying to [comment:4 kcrisman]:
> Replying to [comment:3 jhpalmieri]:
> > At the end, is it worth giving brief descriptions of what these do?
{{{
make test
make check
make testlong
make ptest
make ptestlong
}}}
> Yes, please!
Done.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6908#comment:5>
Sage <http://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
-~----------~----~----~----~------~----~------~--~---