26 @pytest.hookimpl(tryfirst=True)
27 def pytest_collection_modifyitems(self, session, config, items):
33 for marker
in item.own_markers:
34 if marker.name ==
'servicetest':
36 elif marker.name ==
'includetest':
40 paths.add(pathlib.Path(item.module.__file__).parent)
45 tests_root = min(paths, key=
lambda p: len(p.parts))
47 module = ServiceRunnerModule.from_parent(
49 path=pathlib.Path(tests_root).resolve(),
51 function = pytest.Function.from_parent(
53 name=test_service_default.__name__,
54 callobj=test_service_default,
57 items.append(function)
60@pytest.mark.servicetest