#13928: Problematic file filter in skip() from sage-ptest
---------------------------------+------------------------------------------
Reporter: ncohen | Owner: mvngu
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.6
Component: doctest | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: Nathann Cohen | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Comment (by jhpalmieri):
With or without Nathann's patch, we should fix the actual bug:
{{{
#!diff
diff --git a/sage-ptest b/sage-ptest
--- a/sage-ptest
+++ b/sage-ptest
@@ -429,6 +429,7 @@ for gr in range(0,numglobaliteration):
interrupt = False
numthreads = min(numthreads, len(files)) # don't use more threads
than files
+ numthreads = max(numthreads, 1) # use at least one thread
if len(files) == 1:
file_str = "1 file"
}}}
although as Leif says we could also give a warning if no files will be
tested, and also a warning about the hidden directory issue. For example:
{{{
#!diff
diff --git a/sage-ptest b/sage-ptest
--- a/sage-ptest
+++ b/sage-ptest
@@ -358,6 +358,15 @@ for gr in range(0,numglobaliteration):
infiles.sort()
+ for F in infiles:
+ F = abspath(F)
+ if os.path.sep + '.' in F.lstrip(os.path.sep + '.'):
+ print """Warning:
+
+ %s
+
+will be not be tested because it is in a hidden directory.""" % F
+
files = list()
t0 = time.time()
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13928#comment:11>
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.