[py-svn] r17511 - py/dist/py/test

hpk at codespeak.net hpk at codespeak.net
Mon Sep 12 20:08:05 CEST 2005


Author: hpk
Date: Mon Sep 12 20:08:04 2005
New Revision: 17511

Modified:
   py/dist/py/test/config.py
Log:
keep a bit the order of configpaths 


Modified: py/dist/py/test/config.py
==============================================================================
--- py/dist/py/test/config.py	(original)
+++ py/dist/py/test/config.py	Mon Sep 12 20:08:04 2005
@@ -176,15 +176,16 @@
 def guessconfigpaths(*paths):
     """ return test configuration paths from skimming the args. """ 
     d = {}
+    l = []
     for anchor in paths: 
         if anchor: 
             for p in anchor.parts():
                 x = p.join(configbasename)
-                if x.check(file=1):
+                if x not in d and x.check(file=1):
                     d[x] = True 
-    configpaths = d.keys() 
-    configpaths.sort(lambda x,y: cmp(len(str(x)), len(str(y))))
-    return configpaths 
+                    l.append(x) 
+    l.reverse()
+    return l 
 
 def getanchorpaths(args):
     """ yield "anchors" from skimming the args for existing files/dirs. """



More information about the pytest-commit mailing list