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,