check and load test*/conftest.py early from anchors -

this makes it a bit more convenient to have command line options
available from a root directory of a project that does not
directly contain a conftest.py

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-02-04 12:26:53 +01:00
parent 33d78f41b2
commit 7bd60b5abb
3 changed files with 23 additions and 0 deletions

View File

@@ -39,6 +39,10 @@ class Conftest(object):
anchor = current.join(arg, abs=1)
if anchor.check(): # we found some file object
self._path2confmods[None] = self.getconftestmodules(anchor)
# let's also consider test* dirs
if anchor.check(dir=1):
for x in anchor.listdir("test*"):
self.getconftestmodules(x)
break
else:
assert 0, "no root of filesystem?"