#4568: Dangerous doc test of save_session
-----------------------+----------------------------------------------------
Reporter: SimonKing | Owner: mabshoff
Type: defect | Status: new
Priority: major | Milestone:
Component: doctest | Keywords:
-----------------------+----------------------------------------------------
The doc test of `save_session` does the following:
{{{
EXAMPLES:
sage: a = 5
sage: save_session('session')
...
Clean up the session file we just wrote to disk.
sage: os.unlink('session.sobj')
}}}
Hence, if the user happens to have a file `session.sobj` in the current
directory then running the doc test would destroy it.
According to a suggestion of Robert Bradshow, using the `tempfile` Python
module might help.
Unfortunately I have no idea in what file `save_session` is defined - so,
no patch at that point...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4568>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---