Ticket #13928: trac_13928.patch

File trac_13928.patch, 1.4 KB (added by ncohen, 7 years ago)
  • sage-ptest

    # HG changeset patch
    # User Nils Bruin <nbruin@sfu.ca>
    # Date 1357683463 28800
    # Node ID 9c9c117f1a31650257a01e0f71793d0e4f9249cd
    # Parent  e1bb7e45f9e6a6ca3d652ce62ccdcd62802ff0ff
    Rationalize place where dotted filenames are pruned in ptest
    
    diff --git a/sage-ptest b/sage-ptest
    a b  
    147147        printmutex.release()
    148148        return True
    149149    filenm = os.path.split(F)[1]
    150     if (filenm[0] == '.' or (os.path.sep + '.' in G.lstrip(os.path.sep + '.'))
    151         or 'nodoctest' in open(G).read()[:50]):
     150    if 'nodoctest' in open(G).read()[:50]:
    152151        return True
    153152    if G.find(os.path.join('doc', 'output')) != -1:
    154153        return True
     
    288287        walkdir = os.path.join(CUR,FF)
    289288
    290289        for root, dirs, lfiles in os.walk(walkdir):
     290            dirs[:]=(n for n in dirs if len(n) == 0 or n[0] != '.')
     291            lfiles[:]=(n for n in lfiles if len(n) == 0 or n[0] != '.')
    291292            for F in lfiles:
    292293                base, ext = os.path.splitext(F)
    293294                if not (ext in ['.sage', '.py', '.pyx', '.spyx', '.tex', '.pxi', '.rst']):
     
    429430    interrupt = False
    430431
    431432    numthreads = min(numthreads, len(files))  # don't use more threads than files
    432        
     433    if len(files) == 0:
     434        print "\nWarning: no files to test!\n"
     435
    433436    if len(files) == 1:
    434437        file_str = "1 file"
    435438    else: