<div dir="ltr"><div>On Thu, Jan 4, 2018 at 3:51 PM, Bruno Oliveira <span dir="ltr">&lt;<a href="mailto:nicoddemus@gmail.com" target="_blank">nicoddemus@gmail.com</a>&gt;</span> wrote:<br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Dan,<div><br></div><div>(Cool to know you use pytest-qt :))<br></div></div></blockquote><div>We don&#39;t actually use pytest qt! I&#39;d love to, but the way that our current qt-based tests run is problematic. I&#39;ll take your smiley face as a another encouragement to move towards pytest-qt...</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br><div class="gmail_quote"><span class="gmail-"><div dir="ltr">On Thu, Jan 4, 2018 at 7:31 PM Dan Nealschneider &lt;<a href="mailto:dan.nealschneider@schrodinger.com" target="_blank">dan.nealschneider@<wbr>schrodinger.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>1. How should I ensure that start_qapp is run before any test or test setup?<br></div></div></blockquote><div><br></div></span><div>Unfortunately the only way I know of is to change your setUpClass method into an autouse fixture, this technique is detailed here: <a href="https://github.com/pytest-dev/pytest/issues/517#issuecomment-128150676" target="_blank">https://github.com/<wbr>pytest-dev/pytest/issues/517#<wbr>issuecomment-128150676</a> </div></div></div></div></blockquote><div>Yeah, that&#39;s what I suspected... I can totally easily fix this one test, but unfortunately we have tens of thousands of tests, so I won&#39;t be updating them by hand super soon. It would be nice if unittest2pytest updated setUp and setUpClass, then I could make some </div><div>serious progress. Maybe I&#39;ll take a stab at updating unittest2pytest. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div class="gmail_quote"><span class="gmail-"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>2. Does this seem like a bug/RFE that I should report to pytest?</div></div></blockquote><div><br></div></span><div>This has actually been discussed extensively [1] and there is an implementation idea which is easy to implement and would make xunit setup/fixtures work better together [2] but there&#39;s the concern of breaking backward compatibility: definitely there are people who depend on the current behavior and just changing this would break their test suite in subtle and no fun ways [3].</div><div><br></div><div>[1] <a href="https://github.com/pytest-dev/pytest/issues/517" target="_blank">https://github.com/pytest-dev/<wbr>pytest/issues/517</a> </div><div>[2] <a href="https://github.com/pytest-dev/pytest/issues/517#issuecomment-228830714" target="_blank">https://github.com/pytest-<wbr>dev/pytest/issues/517#<wbr>issuecomment-228830714</a></div><div>[3] <a href="https://github.com/pytest-dev/pytest/issues/517#issuecomment-229506416" target="_blank">https://github.com/pytest-<wbr>dev/pytest/issues/517#<wbr>issuecomment-229506416</a></div></div></div></div></blockquote><div>Cool. Thanks, Bruno!</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div class="gmail_quote"><div><br></div><div>Cheers,</div><div>Bruno.</div></div></div></div>
</blockquote></div><br></div></div>