Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Now pytest-parallel adds a pid to the test name. #101

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pytest_parallel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ def pytest_runtest_logreport(self, report):
# We want workers to report to it's master.
# Without this "if", master will try to report to itself.
if self._config.parallel_worker:
if report.location is not None:
location_with_pid = f'{report.location[2]} (pid: {os.getpid()})'
report.location = report.location[:2] + (location_with_pid,)

report.nodeid = f'{report.nodeid} (pid: {os.getpid()})'
data = self._config.hook.pytest_report_to_serializable(
config=self._config, report=report
)
Expand Down