<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Wouter,</p>
<p><br>
</p>
<p>currently there is no way to do fixture setup in parallel and
also no underlying structure to implement concurrent and/or
parallel fixture creation.<br>
enabling something like it is no easy feat and requires a major
rework of the internals of the pytest fixture system.</p>
<p><br>
</p>
<p>-- Ronny<br>
</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">Am 24.11.2017 um 08:02 schrieb Wouter
Overmeire:<br>
</div>
<blockquote type="cite"
cite="mid:CAKS7gT7ciOZ9FUWc9uN3Req-t7=pHDbqGyWqL1baF4YOst8FJw@mail.gmail.com">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>Is there a way in pytest (or a plugin) to setup test
fixtures in parallel?</div>
<div>Not running the tests in // but only setup the fixtures in
//.</div>
<div><br>
</div>
<div>Suppose I have a number of tests and each have a different
number of fixtures.</div>
<div>The fixtures take long to setup, given they are independent
of each other and not cpu limited, setup could be done in //.</div>
<div><br>
</div>
<div>I prefer not to stuff all fixtures in one major fixture and
control from this one how to build.</div>
<div>Not all tests use the same fixtures, and fixtures come and
go. Ideally I`m looking for a way to add additional decorator
(or arg on existing fixture pytest decorator) on a fixture
indicating it can be setup in //.</div>
<div><br>
</div>
<div>I`m familiar with the concept of scope on fixtures, but
even for session scoped fixtures I would like to setup them in
//.</div>
<div><br>
</div>
<div>Probably not so trivial given fixtures can be hierarchical.</div>
<div><br>
</div>
<div>The hook pytest_fixture_setup looks the way to go, I`m
wondering how to run rest of the fixture setup chain in a
thread and return the fixture when done, This feels like
breaking the api model behind hooks, given return value of
hook determines to stop the chain. Not modify rest of the call
chain.<br>
</div>
<div><br>
</div>
<div>Wouter</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
testing-in-python mailing list
<a class="moz-txt-link-abbreviated" href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a>
<a class="moz-txt-link-freetext" href="http://lists.idyll.org/listinfo/testing-in-python">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre>
</blockquote>
<br>
</body>
</html>