diff --git a/CHANGELOG b/CHANGELOG index be369bc06..912eab216 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/testing/test_runner.py b/testing/test_runner.py index 984f382e3..fcd524f0c 100644 --- a/testing/test_runner.py +++ b/testing/test_runner.py @@ -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()