xpass tests don't cause non-zero exit codes

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-10-22 12:00:17 +02:00
parent 76a1bf391e
commit 1999180dfd
5 changed files with 5 additions and 4 deletions

View File

@@ -106,7 +106,7 @@ class Session(object):
self.collection = Collection(config) # XXX move elswehre
def pytest_runtest_logreport(self, report):
if report.failed:
if report.failed and 'xfail' not in report.keywords:
self._testsfailed += 1
maxfail = self.config.getvalue("maxfail")
if maxfail and self._testsfailed >= maxfail: