2009-09-11 18:05:06 +08:00
|
|
|
import py
|
2009-11-24 22:16:58 +08:00
|
|
|
mydir = py.path.local(__file__).dirpath()
|
2009-09-11 18:05:06 +08:00
|
|
|
|
|
|
|
def pytest_runtest_setup(item):
|
|
|
|
if isinstance(item, py.test.collect.Function):
|
2009-11-24 22:16:58 +08:00
|
|
|
if not item.fspath.relto(mydir):
|
|
|
|
return
|
2009-09-11 18:05:06 +08:00
|
|
|
mod = item.getparent(py.test.collect.Module).obj
|
|
|
|
if hasattr(mod, 'hello'):
|
|
|
|
py.builtin.print_("mod.hello", mod.hello)
|