Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 25, 2022
1 parent fdf1b49 commit 25ccfa1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/xdist/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,13 @@ 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":
# Worker shared_data are grouped together, master data aren't
shared[key] = [value]
else:
shared[key] = value

return _add

0 comments on commit 25ccfa1

Please sign in to comment.