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 |
and we thus have no completely safe way of determining |
which parts of the arguments are actually related to options. |
""" |
current = py.path.local() |
for arg in args + [current]: |
anchor = current.join(arg, abs=1) |
if anchor.check(): |
|
|
|
-> self._path2confmods[None] = self.getconftestmodules(anchor) |
|
break |