On 11.10.2013, at 17:58, Ronny Pfannschmidt <[email protected]> wrote:
> Hi Holger,
>
> i think that just 'each' is too generic,
> i'd rather see something more specific like scope='session,function'
>
> i think its very important to be in control of the actual scopes used in a
> fixture
>
> an example i have in mind is a semi-generic tmpdir fixture
>
> @pytest.fixture(scope='session,function')
> def tmpdir(request, _pytest_basetmp):
> if request.scope == 'session':
> return _basetmp.ensure('session', dir=1)
> elif request.scope == 'function':
> return _basetmp.ensure('tests', dir=1)\
> .make_numbered_dir(request.function__name__)
If something like this is chosen, then please use a list or tuple, not a comma
separated string.
Regards,
Florian Schulze
_______________________________________________
Pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev