#9739: Handle duplicate file basenames when testing multiple files in parallel
------------------------+---------------------------------------------------
Reporter: mpatel | Owner: mvngu
Type: defect | Status: new
Priority: critical | Milestone:
Component: doctest | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
Old description:
> When we test
>
> `/path/to/foo.py`
>
> `sage-doctest` writes
>
> `SAGE_TESTDIR/.doctest_foo.py`
>
> runs the new file through `python`, and deletes it. This can cause
> collisions when we test in parallel multiple files with the same
> basename, e.g., `__init__`, `all`, `misc`, `conf`, `constructor`,
> `morphism`, `index`, `tests`, `homset`, `element`, `twist`, `tutorial`,
> `sagetex`, `crystals`, `cartesian_product`, `template`, `ring`, etc.
>
> There's a similar problem with testing non-library files, which `sage-
> doctest` first effectively copies to `SAGE_TESTDIR`.
>
> See [http://groups.google.com/group/sage-
> devel/browse_thread/thread/0239f712a39fce4a/367bfc0d83c0e9b8#367bfc0d83c0e9b8
> sage-devel] for background.
New description:
When we test
`/path/to/foo.py`
`sage-doctest` writes
`SAGE_TESTDIR/.doctest_foo.py`
runs the new file through `python`, and deletes it. This can cause
collisions when we test in parallel multiple files with the same
basename, e.g., `__init__`, `all`, `misc`, `conf`, `constructor`,
`morphism`, `index`, `tests`, `homset`, `element`, `twist`, `tutorial`,
`sagetex`, `crystals`, `cartesian_product`, `template`, `ring`, etc.
There's a similar problem with testing non-library files, which `sage-
doctest` first effectively copies to `SAGE_TESTDIR`.
See [http://groups.google.com/group/sage-
devel/browse_thread/thread/0239f712a39fce4a/367bfc0d83c0e9b8#367bfc0d83c0e9b8
sage-devel] for background.
This ticket may help with some of the doctesting problems discussed on the
Sage mailing lists. Related tickets: #9224, #9225, #9449.
--
Comment(by mpatel):
William Stein [http://groups.google.com/group/sage-
devel/browse_thread/thread/0239f712a39fce4a/488672084383d442#488672084383d442
suggests]:
{{{
Could we use the tempfile module instead of using SAGE_TESTDIR. The
tempfile module makes files and directories by default that are unique
and are *designed* to live on a fast filesystem, which gets cleaned
regularly.
sage: import tempfile
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9739#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
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.