Hi On Thu, Sep 10, 2009 at 05:56:16AM -0700, Simon King wrote: > On Sep 10, 1:45 pm, Jan Groenewald <j...@aims.ac.za> wrote: > [...] > > 0 j...@muizenberg:~$sage -t test.py > > ERROR: File ./test.py is missing > > exit code: 1 > > Strange. If test.py is in your current directory, why isn't it found?
That is what I am trying to find out. I suspect the first dot is not the current directory, but some SAGE environment variable. Note the absolute path below DOES find it. > > 0 j...@muizenberg:~$sage -t ~/test.py > > sage -t "/home/jan/test.py" > > Traceback (most recent call last): > > File "/usr/local/src/sage-4.1.1/local/bin/sage-doctest", line 754, in > > <module> > > test_file(argv[1], library_code = library_code) > > File "/usr/local/src/sage-4.1.1/local/bin/sage-doctest", line 587, in > > test_file > > open(f,"w").write(s) > > IOError: [Errno 13] Permission denied: './.doctest_test.py' > > [0.2 s] > > exit code: 256 > > So, that's a different error. It says that you are not allowed to > write into the current directory, which is strange since you were > allowed to write test.py there. Yes, once it is found the error is a new one. Again, that current is not current. It is some SAGE dir. If I can find it I can give users write permissions. I strace: 0 j...@muizenberg:~$strace -e open sage -t ~/test.py open("/etc/ld.so.cache", O_RDONLY) = 3 <snip> open("/usr/lib/locale/en_ZA.utf8/LC_CTYPE", O_RDONLY) = 3 open("/proc/meminfo", O_RDONLY) = 3 open("/proc/sys/kernel/ngroups_max", O_RDONLY) = 3 open("/usr/local/bin/sage", O_RDONLY) = 3 --- SIGCHLD (Child exited) @ 0 (0) --- sage -t "/home/jan/test.py" Traceback (most recent call last): File "/usr/local/src/sage-4.1.1/local/bin/sage-doctest", line 754, in <module> test_file(argv[1], library_code = library_code) File "/usr/local/src/sage-4.1.1/local/bin/sage-doctest", line 587, in test_file open(f,"w").write(s) IOError: [Errno 13] Permission denied: './.doctest_test.py' [0.1 s] exit code: 256 ---------------------------------------------------------------------- The following tests failed: sage -t "/home/jan/test.py" Total time for all tests: 0.1 seconds --- SIGCHLD (Child exited) @ 0 (0) --- 0 j...@muizenberg:~$ In some previous posts on sage-support I edited /usr/local/src/sage-4.1.1/local/bin/sage-doctest to print more feedback. That library_code is never true (I think?) in our case of users testing their own code. Or sage.math just sets some vars for you. > I don't know what you did different from me. For completeness, here is > what I did on sage.math in my home directory. Of course, I have write > permissions in my home directory, but not in the default SAGE_TESTDIR. What does echo $SAGE<TAB> say? > Now, the doc test fails as it is supposed to: I see it. I'm at a loss. Jan -- .~. /V\ Jan Groenewald /( )\ www.aims.ac.za ^^-^^ --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---