OK, I've tried to replicate your scenario and for me it works (on linux), 
so it might be something about OSX. I think what you are experiencing can 
be characterized as a "bug". Hopefully someone can fix it or find a 
work-around. For reference, this is what I get:

$ pwd
/home/nbruin/U
$ ls -dl example_script.py
-rwxrwxr-x 1 nbruin nbruin 194 2013-11-08 12:54 example_script.py
$ dir=$(pwd); while [ ! -z "$dir" ]; do ls -ld "$dir"; dir=${dir%/*}; done; 
ls -ld /
drwxrwxr-x 2 nbruin nbruin 4096 2013-11-08 12:54 /home/nbruin/U
drwxr-xr-x 22 nbruin nbruin 4096 2013-11-08 12:54 /home/nbruin
drwxr-xr-x 361 root root 12288 2013-10-29 15:06 /home
drwxr-xr-x 28 root root 4096 2013-09-26 09:14 /
$ ls -dl `which sage`
-rwxr-xr-x 1 root root 4995 2012-05-17 23:06 /usr/local/bin/sage
$ umask
0022
$ sage -t example_script.py 
Traceback (most recent call last):
  File "/usr/local/share/sage-5.8/local/bin/sage-test", line 53, in <module>
    .format(os.getcwd()))
RuntimeError: refusing to run doctests from the current directory 
'/home/nbruin/U' since untrusted users could put files in this directory, 
making it unsafe to run Sage code from
$ umask 002
$ umask
0002
$ sage -t example_script.py 
sage -t  "example_script.py"                                
     [3.9 s]
 
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 4.0 seconds

There is one workaround possible: build sage's python with the relevant 
patch removed. It's "sys_path_security.patch". Your system administrator 
might be able to help.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to