test_ok2/example/assertion/global_testmodule_config/conftest.py

8 lines
239 B
Python

import py
def pytest_runtest_setup(item):
if isinstance(item, py.test.collect.Function):
mod = item.getparent(py.test.collect.Module).obj
if hasattr(mod, 'hello'):
py.builtin.print_("mod.hello", mod.hello)