From 4865bec4b5a1955a2544c12054c03ad74c1f8731 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Wed, 26 Oct 2022 18:46:42 +0100 Subject: [PATCH] Remove use of rsyncdir Fixes: #557 --- src/pytest_cov/engine.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pytest_cov/engine.py b/src/pytest_cov/engine.py index bfede8c7..27e1a090 100644 --- a/src/pytest_cov/engine.py +++ b/src/pytest_cov/engine.py @@ -260,7 +260,9 @@ def start(self): # Ensure coverage rc file rsynced if appropriate. if self.cov_config and os.path.exists(self.cov_config): - self.config.option.rsyncdir.append(self.cov_config) + # rsyncdir is going away in pytest-xdist 4.0, already deprecated + if hasattr(self.config.option, 'rsyncdir'): + self.config.option.rsyncdir.append(self.cov_config) self.cov = coverage.Coverage(source=self.cov_source, branch=self.cov_branch,