xpass tests don't cause non-zero exit codes
--HG-- branch : trunk
This commit is contained in:
parent
76a1bf391e
commit
1999180dfd
|
@ -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
|
||||
----------------------------------------------
|
||||
|
|
|
@ -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']
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
2
setup.py
2
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'],
|
||||
|
|
|
@ -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("""
|
||||
|
|
Loading…
Reference in New Issue