3 new commits in pytest: https://bitbucket.org/hpk42/pytest/commits/44765914d448/ Changeset: 44765914d448 User: hg Date: 2013-05-05 22:15:06 Summary: #299 Affected #: 1 file
diff -r b93ac0cdae02effaa3c136a681cc45bba757fe46 -r 44765914d448f7675c404af4ed56f5daaaf3f916 _pytest/runner.py --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -198,7 +198,7 @@ if call.when == "call": longrepr = item.repr_failure(excinfo) else: # exception in setup or teardown - longrepr = item._repr_failure_py(excinfo) + longrepr = item._repr_failure_py(excinfo,style=item.config.option.tbstyle) return TestReport(item.nodeid, item.location, keywords, outcome, longrepr, when, duration=duration) https://bitbucket.org/hpk42/pytest/commits/406ceacf7d22/ Changeset: 406ceacf7d22 User: maho Date: 2013-05-08 17:01:20 Summary: #299 - polishing Affected #: 2 files diff -r 44765914d448f7675c404af4ed56f5daaaf3f916 -r 406ceacf7d227cf30ef0357c1030f5934f04ac01 _pytest/runner.py --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -198,7 +198,8 @@ if call.when == "call": longrepr = item.repr_failure(excinfo) else: # exception in setup or teardown - longrepr = item._repr_failure_py(excinfo,style=item.config.option.tbstyle) + longrepr = item._repr_failure_py(excinfo, + style=item.config.option.tbstyle) return TestReport(item.nodeid, item.location, keywords, outcome, longrepr, when, duration=duration) diff -r 44765914d448f7675c404af4ed56f5daaaf3f916 -r 406ceacf7d227cf30ef0357c1030f5934f04ac01 testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -665,3 +665,19 @@ result.stdout.fnmatch_lines([ "*2 passed*" ]) + + +def test_tbstyle_native_setup_error(testdir): + p = testdir.makepyfile(""" + import pytest + @pytest.fixture + def setup_error_fixture(): + raise Exception("error in exception") + + def test_error_fixture(setup_error_fixture): + pass + """) + result = testdir.runpytest("--tb=native") + result.stdout.fnmatch_lines([ + '*File *test_tbstyle_native_setup_error.py", line *, in setup_error_fixture*' + ]) https://bitbucket.org/hpk42/pytest/commits/0418f5c7b7b5/ Changeset: 0418f5c7b7b5 User: hpk42 Date: 2013-05-09 15:32:29 Summary: Merged in maho/pytest (pull request #31) #299 Affected #: 2 files diff -r 17f3904c6e8e7c55575ac20dcf06e90124f17842 -r 0418f5c7b7b5740ebb349ff3af0bc5073797c55d _pytest/runner.py --- a/_pytest/runner.py +++ b/_pytest/runner.py @@ -198,7 +198,8 @@ if call.when == "call": longrepr = item.repr_failure(excinfo) else: # exception in setup or teardown - longrepr = item._repr_failure_py(excinfo) + longrepr = item._repr_failure_py(excinfo, + style=item.config.option.tbstyle) return TestReport(item.nodeid, item.location, keywords, outcome, longrepr, when, duration=duration) diff -r 17f3904c6e8e7c55575ac20dcf06e90124f17842 -r 0418f5c7b7b5740ebb349ff3af0bc5073797c55d testing/test_terminal.py --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -665,3 +665,19 @@ result.stdout.fnmatch_lines([ "*2 passed*" ]) + + +def test_tbstyle_native_setup_error(testdir): + p = testdir.makepyfile(""" + import pytest + @pytest.fixture + def setup_error_fixture(): + raise Exception("error in exception") + + def test_error_fixture(setup_error_fixture): + pass + """) + result = testdir.runpytest("--tb=native") + result.stdout.fnmatch_lines([ + '*File *test_tbstyle_native_setup_error.py", line *, in setup_error_fixture*' + ]) Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ pytest-commit mailing list pytest-commit@python.org http://mail.python.org/mailman/listinfo/pytest-commit