#9739: Handle duplicate file basenames when testing multiple files in parallel
-------------------------------+--------------------------------------------
   Reporter:  mpatel           |          Owner:  mvngu                      
       Type:  defect           |         Status:  needs_review               
   Priority:  critical         |      Milestone:  sage-4.7.1                 
  Component:  doctest          |       Keywords:  doctest scripts            
Work_issues:                   |       Upstream:  N/A                        
   Reviewer:  Robert Bradshaw  |         Author:  Mitesh Patel, John Palmieri
     Merged:                   |   Dependencies:                             
-------------------------------+--------------------------------------------

Comment(by leif):

 Replying to [comment:58 jhpalmieri]:
 > Oops, just found a mistake.  In non-Sage library code, when doctesting
 "file0.py", we write a line
 {{{
 from file0 import *
 }}}
 > With the name mangling, this doesn't work anymore: the periods confuse
 things, and so would hyphens, commas, and other symbols not allowed in
 python module names.

 Hence underscores, which I originally thought of?

 It doesn't make sense to copy [only] each single non-library file to
 doctest to the temporary directory anyway, as it might import other files
 located in the original directory.

 We could either just `cd` to the original directory, or -- IMHO much
 better -- add the original directory to `PYTHONPATH` or `sys.path`, both
 methods solving the mangling issue in `from ... import *`, as well as
 saving useless copying. (We of course still have to create temporary
 preparsed files in `SAGE_TESTDIR/.../` for `.sage` and `.spyx` files
 though.)

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9739#comment:60>
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.

Reply via email to