diff --git a/CHANGELOG b/CHANGELOG index 4aa8359be..31164b9ba 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -20,6 +20,7 @@ Changes between 1.3.4 and 2.0.0dev0 - fix issue88 (finding custom test nodes from command line arg) - refine 'tmpdir' creation, will now create basenames better associated with test names (thanks Ronny) +- "xpass" (unexpected pass) tests don't cause exitcode!=0 Changes between 1.3.3 and 1.3.4 ---------------------------------------------- diff --git a/pytest/__init__.py b/pytest/__init__.py index 6454b942d..f63b0c006 100644 --- a/pytest/__init__.py +++ b/pytest/__init__.py @@ -5,7 +5,7 @@ see http://pytest.org for documentation and details (c) Holger Krekel and others, 2004-2010 """ -__version__ = "2.0.0.dev1" +__version__ = "2.0.0.dev3" __all__ = ['config', 'cmdline'] diff --git a/pytest/plugin/session.py b/pytest/plugin/session.py index 1ea8a539c..df2ab3af9 100644 --- a/pytest/plugin/session.py +++ b/pytest/plugin/session.py @@ -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: diff --git a/setup.py b/setup.py index 209930e26..0eaeeb17c 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ def main(): name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version= '2.0.0.dev1', + version= '2.0.0.dev3', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff --git a/testing/plugin/test_skipping.py b/testing/plugin/test_skipping.py index 33c16bb46..0590559d4 100644 --- a/testing/plugin/test_skipping.py +++ b/testing/plugin/test_skipping.py @@ -218,7 +218,7 @@ class TestXFail: "*XPASS*test_that*", "*1 xpassed*" ]) - assert result.ret == 1 + assert result.ret == 0 def test_xfail_imperative(self, testdir): p = testdir.makepyfile("""