26 @pytest.hookimpl(tryfirst=True)
27 def pytest_collection_modifyitems(self, session, config, items):
32 paths.add(pathlib.Path(item.module.__file__).parent)
33 for marker
in item.own_markers:
34 if marker.name ==
'servicetest':
40 tests_root = min(paths, key=
lambda p: len(p.parts))
42 module = ServiceRunnerModule.from_parent(
44 path=(pathlib.Path(tests_root) /
'__service__').resolve(),
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