[py-dev] use of md5 checksum in config.py/getconftestmodules looks fishy

Ralf Schmitt ralf at brainbot.com
Mon Dec 27 20:12:33 CET 2010

_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.

-- Ralf

More information about the Pytest-dev mailing list