Skip to content

Commit

Permalink
Fix pytest-xdist test
Browse files Browse the repository at this point in the history
  • Loading branch information
christiansandberg committed Feb 28, 2024
1 parent 44045c9 commit 1c2ba25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytest_reporter/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def pytest_configure(config):
@pytest.hookimpl(hookwrapper=True)
def pytest_collection(session):
yield
if not hasattr(session, "items") and hasattr(session.config, "_reporter"):
if not getattr(session, "items", []) and hasattr(session.config, "_reporter"):
# Collection was skipped (probably due to xdist)
session.perform_collect()

Expand Down

0 comments on commit 1c2ba25

Please sign in to comment.