27 @pytest.hookimpl(tryfirst=True)
28 def pytest_collection_modifyitems(self, session, config, items):
33 paths.add(pathlib.Path(item.module.__file__).parent)
34 for marker
in item.own_markers:
35 if marker.name ==
'servicetest':
41 tests_root = min(paths, key=
lambda p: len(p.parts))
43 module = ServiceRunnerModule.from_parent(
44 parent=session, fspath=py.path.local(tests_root /
'__service__'),
46 function = pytest.Function.from_parent(
48 name=test_service_default.__name__,
49 callobj=test_service_default,
52 items.append(function)
55@pytest.mark.servicetest