<div dir="ltr">Hi Tony,<div><br></div><div>I do this regularly and it works quite well.  However, I have been caught by environment variables not being forwarded by Tox by default.  Check `passenv` and `setenv` environment settings.</div><div><br></div><div>Also, this may be unrelated to your problem, but since you mentioned running on Windows, I&#39;d advise paying close attention to child process cleanup.  By default, Windows does not automatically terminte child processes when the parent process dies.  If you start any long-running background processes (e.g. some kind of server process managed by a session fixture), it can end up dangling after (repeated) CTRL-C or a forceful kill of the Python process.</div><div><br></div><div>Cheers,</div><div><br></div><div>André</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 1, 2018 at 8:59 PM Bruno Oliveira &lt;<a href="mailto:nicoddemus@gmail.com">nicoddemus@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Tony,<div><br></div><div>There&#39;s nothing in pytest that prevents you to spawn subprocesses. Posting your code and the error or problem you are having will probably help (specially if the code is small and reproduces the issue).</div><div><br></div><div>Cheers,</div><div>Bruno</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 1, 2018 at 8:51 PM Tony Cappellini &lt;<a href="mailto:cappy2112@gmail.com" target="_blank">cappy2112@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div>I&#39;ve spent a lot of time trying to figure this out, so I thought I&#39;d ask those who have more experience with Pytest.</div><div><br></div><div>I&#39;m running Python 2.7.14 on Windows 7 Pro (64-bit), pytest 3.5.0</div><div><br></div><div>Is there any reason a test running under pytest shouldn&#39;t spawn a subprocess, or</div><div>take special care when spawning it?</div><div><br></div><div>I&#39;m not able to get a subprocess to launch using subprocess.Popen() inside of a pytest test, but I can run spawn the subrpocess outside of pytest.</div><div><br></div><div>I don&#39;t know if I can attach my code to this post.</div><div><br></div><div>I&#39;ll provide more details and the code, after the reply.</div><div><br></div><div>Thanks</div><div><br></div></div>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" rel="noreferrer" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</blockquote></div>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org" target="_blank">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" rel="noreferrer" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</blockquote></div>