diff --git a/pytest_parallel/__init__.py b/pytest_parallel/__init__.py index 5702a64..a3071bf 100644 --- a/pytest_parallel/__init__.py +++ b/pytest_parallel/__init__.py @@ -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 )