Okay, I've created a patch to do this. However, it results in a number of doctest failures. They fall into two classes:
1) a bunch of errors, mostly in tut.py and the plotting code, that try to write to the working directory from code like "a.save('a')". 2) Places where the doctests only work if run from the same directory as the module they're testing, i.e. when they do "import matrix_integer_dense_hnf" rather than "import sage.matrix.matrix_integer_dense_hnf as matrix_integer_dense_hnf" or similar. There are a lot of type (1) errors, and I think it's nice for the examples to be able to write files to the current working directory rather than somewhere else, so this rules out changing the doctests. This might be best handled by having sage-maketest chdir to $SAGE_TESTDIR before running the tests. Doctests for that are currently running. I think the type (2) errors are bugs in the doctests (it's certainly a bad documentation example if it only works from that directory), and once my current doctest run finishes I'll submit patches for them. -Tim Abbott On Sun, 30 Mar 2008, mabshoff wrote: > > > > On Mar 31, 2:44?am, Timothy G Abbott <[EMAIL PROTECTED]> wrote: > > Hi Tim, > >> In running doctests with my Debian installation of SAGE (where SAGE_ROOT >> is set to /usr/lib/sagemath), it's been annoying that one needs to run the >> tests as root so that SAGE can write to >> >> - $SAGE_ROOT/tmp/test.log >> - .doctest_filename.py in various directories of the SAGE install >> - the directory .doctest in various directories of the SAGE install >> >> Writing to the SAGE install itself is a good strategy when there may be >> many SAGE installations on the system, since it prevents two SAGE installs >> from both trying to write to /tmp/test.log (or whatever). ?But it's bad >> for a multi-user setting with a single SAGE installation. >> >> I think the right way to fix this is to add a SAGE_TESTDIR environment >> variable, which defaults to SAGE_ROOT/tmp if it is not set, and have all >> these test-related files get written inside SAGE_TESTDIR. ?The SAGE >> wrapper script on Debian would set SAGE_TESTDIR to something like >> ~/.sage/tests (if it isn't set already by the user). > > Yeah, I think that makes sense. But we might want to do something even > more general since in other cases (sage -optional) as non-root the > same permission issues come into place. See #961 for that ticket. > >> Thoughts? >> >> ? ? ? ? -Tim Abbott > > Cheers, > > Michael > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---