fix issue169: respect --tb=style with setup/teardown errors as well.

This commit is contained in:
holger krekel 2013-09-05 15:43:19 +02:00
parent 9686a4129c
commit 517d498285
2 changed files with 13 additions and 0 deletions

View File

@ -119,6 +119,8 @@ known incompatibilities:
Changes between 2.3.4 and 2.3.5
-----------------------------------
- fix issue169: respect --tb=style with setup/teardown errors as well.
- never consider a fixture function for test function collection
- allow re-running of test items / helps to fix pytest-reruntests plugin

View File

@ -483,3 +483,14 @@ def test_unicode_in_longrepr(testdir):
assert result.ret == 1
assert "UnicodeEncodeError" not in result.stderr.str()
def test_failure_in_setup(testdir):
testdir.makepyfile("""
def setup_module():
0/0
def test_func():
pass
""")
result = testdir.runpytest("--tb=line")
assert "def setup_module" not in result.stdout.str()