diff --git a/src/xdist/plugin.py b/src/xdist/plugin.py index f9abe704..e9cf2d62 100644 --- a/src/xdist/plugin.py +++ b/src/xdist/plugin.py @@ -316,6 +316,7 @@ def get_shared_data(request_or_session): @pytest.fixture(scope="session") def add_shared_data(request, worker_id): """Adds data that will be collected from all workers and be accessible from master node in sessionfinish hook""" + def _add(key, value): shared = request.config.stash.setdefault(shared_key, {}) if worker_id == "master": @@ -323,4 +324,5 @@ def _add(key, value): shared[key] = [value] else: shared[key] = value + return _add