I have a directory with two test files with the following content: ,----[ test_1.py ] | #! /usr/bin/env py.test | | def pytest_funcarg__hello(request): | def setup(): | return "hello world" | | def teardown(idx): | raise RuntimeError("fail") | | return request.cached_setup( | setup=setup, | teardown=teardown, | scope="module") | | | def test_val(hello): | assert hello == "hello world" `----
,----[ test_2.py ] | def test_foo(): | pass `---- py.test reports an error for test_foo: ,---- | ========================== test session starts ========================== | platform linux2 -- Python 2.7.2 -- pytest-2.0.3 | collected 2 items | | test_1.py . | test_2.py E | | ================================ ERRORS ================================= | ______________________ ERROR at setup of test_foo _______________________ | | idx = 'hello world' | | def teardown(idx): | > raise RuntimeError("fail") | E RuntimeError: fail | | test_1.py:8: RuntimeError | =================== 1 passed, 1 error in 0.10 seconds =================== `---- Cheers, - Ralf _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev