[py-svn] r56953 - py/branch/event/py/test2

hpk at codespeak.net hpk at codespeak.net
Mon Aug 4 10:42:45 CEST 2008


Author: hpk
Date: Mon Aug  4 10:42:45 2008
New Revision: 56953

Modified:
   py/branch/event/py/test2/conftesthandle.py
Log:
clearer docstring


Modified: py/branch/event/py/test2/conftesthandle.py
==============================================================================
--- py/branch/event/py/test2/conftesthandle.py	(original)
+++ py/branch/event/py/test2/conftesthandle.py	Mon Aug  4 10:42:45 2008
@@ -15,25 +15,21 @@
             self.setinitial([path])
 
     def setinitial(self, args):
-        """ return a Conftest object initialized with a path obtained
-            from looking at the first (usually cmdline) argument that points
-            to an existing file object. 
-            XXX note: conftest files may add command line options
+        """ try to find a first anchor path for looking up global values
+            from conftests. This function is usually called _before_  
+            argument parsing.  conftest files may add command line options
             and we thus have no completely safe way of determining
-            which parts of the arguments are actually related to options. 
+            which parts of the arguments are actually related to options
+            and which are file system paths.  We just try here to get 
+            bootstrapped ... 
         """
         current = py.path.local()
         for arg in args + [current]:
             anchor = current.join(arg, abs=1)
             if anchor.check(): # we found some file object 
-                #print >>py.std.sys.stderr, "initializing conftest from", anchor
-                # conftest-lookups without a path actually mean 
-                # lookups with our initial path. 
                 self._path2confmods[None] = self.getconftestmodules(anchor)
-                #print " -> ", conftest._path2confmods
                 break
 
-
     def getconftestmodules(self, path):
         """ return a list of imported conftest modules for the given path.  """ 
         try:



More information about the pytest-commit mailing list