hi Ralf,
On Mon, Dec 27, 2010 at 20:12 +0100, Ralf Schmitt wrote:
>
> _pytest/config.py contains the following code:
>
> ,----
> | ...
> | conftestpath = path.join("conftest.py")
> | if conftestpath.check(file=1):
> | key = conftestpath.computehash()
> | # XXX logging about conftest loading
> | if key not in self._md5cache:
> | clist.append(self.importconftest(conftestpath))
> | self._md5cache[key] = conftestpath
> | else:
> | # use some kind of logging
> | print ("WARN: not loading %s" % conftestpath)
> `----
>
> If I put multiple conftest.py files with the same content into different
> subdirecties py.test will only read one of them. I try to make py.test
> ignore multiple subdirectories by putting the same conftest.py file into
> those subdirectories. py.test currently only ignores one of those.
Right, this is suprising. Motvation for above code was to
make source trees work which are recursively copied into a subdir
(which can happen with e.g. tox, copying/isntalling thingss into .tox).
But i think this does more harm than good, as shown by your usage.
I just committed a removal of the feature. So to avoid recursion
problems one might need to throw in a "--confcutdir=." or so to prevent
py.test from looking up too much.
cheers,
holger
_______________________________________________
py-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/py-dev