From 26016aefd1821d766c53ea46e7e273047dceb535 Mon Sep 17 00:00:00 2001 From: Jonathan Hunt Date: Sun, 28 Apr 2013 16:14:52 -0700 Subject: [PATCH] Use the error longrepr rather than the file path to check for duplicate errors. --- xdist/dsession.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xdist/dsession.py b/xdist/dsession.py index 88f2725..6ffc80c 100644 --- a/xdist/dsession.py +++ b/xdist/dsession.py @@ -159,7 +159,7 @@ class DSession: self.countfailures = 0 self.maxfail = config.getvalue("maxfail") self.queue = queue.Queue() - self._failed_collection_paths = {} + self._failed_collection_errors = {} try: self.terminal = config.pluginmanager.getplugin("terminalreporter") except KeyError: @@ -290,10 +290,10 @@ class DSession: self._failed_slave_collectreport(node, rep) def _failed_slave_collectreport(self, node, rep): - # Check we haven't already seen this report. - str_path = str(rep.fspath) - if str_path not in self._failed_collection_paths: - self._failed_collection_paths[str_path] = True + # Check we haven't already seen this report (from + # another slave). + if rep.longrepr not in self._failed_collection_errors: + self._failed_collection_errors[rep.longrepr] = True self.config.hook.pytest_collectreport(report=rep) self._handlefailures(rep)