[pytest-dev] pytest-xdist-1.11: restarting crash nodes, fixture cache fix

Floris Bruynooghe flub at devork.be
Thu Sep 18 22:44:19 CEST 2014


[Oops, lost the list on this reply - sorry]

On 18 September 2014 21:43, Floris Bruynooghe <flub at devork.be> wrote:
> On 18 September 2014 19:51, Anatoly Bubenkov <bubenkoff at gmail.com> wrote:
>> hmm, but that grouping is not important for session scoped fixtures, right?
>> i mean, what's the sense of tearing down the session-scoped fixture, even if
>> most likely it will be not used by any test, earlier than the end of the
>> session?
>
> I think you could subvert py.test's tear-fixtures-down-early by making
> your session scoped fixture an autouse fixture, that way all tests
> will need it to run and it won't be torn down early.  However only
> tests explicitly requesting the fixture will be bothered with it's
> existence and value.

-- 
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org


More information about the Pytest-dev mailing list