On Wednesday, November 6, 2013 10:27:53 PM UTC-7, Volker Braun wrote:
> See http://trac.sagemath.org/ticket/13579#comment:40 and following...
>
>
>
> On Wednesday, November 6, 2013 4:14:08 PM UTC-8, [email protected]
> wrote:After our sysadmin updated the computer we use for a major project in
> Sage from v5.3 to v5.12, our automated doctests stopped working. It appears
> to be because the directory that contains our code is group writable (which
> makes sense because there are multiple users in our group who need to use
> this directory). The directory is not world writable. Is there a way to allow
> the doctests to run in a group writable directory?
> Here is the output when trying to run a doctest via sage -t FILENAME:
> Traceback (most recent call last):
> File
> "/Applications/Sage-5.12-OSX-64bit-10.6.app/Contents/Resources/sage/local/bin/sage-runtests",
> line 87, in <module>
> err = DC.run()
> File
> "/Applications/Sage-5.12-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/doctest/control.py",
> line 882, in run
> self.test_safe_directory()
> File
> "/Applications/Sage-5.12-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.7/site-packages/sage/doctest/control.py",
> line 391, in test_safe_directory
> .format(os.getcwd()))
> RuntimeError: refusing to run doctests from the current directory
> '/CURRENT/DIRECTORY' since untrusted users could put files in this directory,
> making it unsafe to run Sage code from
I read through that ticket before posting, but I didn't (and still don't) see a
solution to my problem. Admittedly I don't understand all of the issues talked
about on that ticket. I created a test script in the same group writable
directory I mentioned previously with the following content:
def spam():
"""
Run this function.
EXAMPLE::
sage: spam()
"Here's your spam."
"""
print "Here's your spam."
if __name__ == "__main__":
spam()
When I run this with python or sage, it runs fine. However, when I try to run
the doctest, I get the same RuntimeError as before. I'm not sure how this fits
into the discussion you referenced on trac, but it doesn't seem like the right
behavior, unless I'm missing something.
--
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.