On 23 April 2013 17:39, holger krekel <[email protected]> wrote:

> for clarification why i think this needs more discussion and playing
> around: what exactly should a fixturemanagers __exit__() see
> as exception value?  If we have multiple "contextmanager" fixtures like
> this:
>
>     def test_fixtures(fix1, fix2, fix3, ...):
>
> and fix2's setup fails, should fix1's __exit__ see that exception?
> Or should only exceptions from the actual test body be seen and then
> be seen by each fixN's __exit__ repeatedly?
>
> What about fixtures that have caching scopes higher than "function"?
> Should they ever receive exceptions in their __exit__?
>

Ah right... yes. I see how that is a problem.

Maybe then I need to refactor my context manager so it can used more easily
as a funcarg. :)

Brianna

-- 
They've just been waiting in a mountain for the right moment:
http://modernthings.org/
_______________________________________________
Pytest-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to