<div dir="ltr">HI,<div><br></div><div>Sorry, maybe my opinion is a kind of oftopic but I think there is no reason to use fixtures at all. Instead of fixtures you should use <a href="http://factoryboy.readthedocs.org/en/latest/">factory_boy</a> library(or similar).</div>
<div><br></div><div>As I said it is just IMHO and maybe I miss some scenario when there is no way to avoid fixtures(for example, when you don&#39;t use ORM). But I think those cases are rare.</div><div><br></div><div>--</div>
<div>Max</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-09-02 16:14 GMT+03:00 Laszlo Papp <span dir="ltr">&lt;<a href="mailto:lpapp@kde.org" target="_blank">lpapp@kde.org</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I am sorry about bringing up another frustration with the official<br>
documentation, but ...<br>
<br>
It does not seem simple and easy to write a test class and have setup<br>
and teardown methods with fixtures. The documentation properly<br>
demonstrates a working version of the &quot;old way&quot;; so far so good.<br>
<br>
Yet, I thought being narrow-minded would not be fair, so I gave a try<br>
to the &quot;new way&quot;, but I just failed in every way possible that I have<br>
tried. I found some chunk code snippets on Stack Overflow and in the<br>
official documentation, but they are not good.<br>
<br>
I could not find any dedicated example explaining how to achieve such<br>
a simple use case with the &quot;new shiny way&quot;. I think the documentation<br>
would need some improvement in pytest. I simply cannot get my head<br>
around to this easily, so I just give up for now since I have to<br>
proceed...<br>
<br>
Currently, I am reverting myself to the &quot;old way&quot;, but if you<br>
advertise the &quot;new way&quot; that much, at least give an example for the<br>
generic and common use case (IMHO) that people, including me, have<br>
used in other frameworks and languages. Otherwise, it is just<br>
non-working hype, IMHO. Sorry, I do not like &quot;new shiny ways&quot; that do<br>
not just work.<br>
<br>
Cheers, L.<br>
<br>
_______________________________________________<br>
testing-in-python mailing list<br>
<a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a><br>
<a href="http://lists.idyll.org/listinfo/testing-in-python" target="_blank">http://lists.idyll.org/listinfo/testing-in-python</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>С уважением,<br>Максим Харандзюк<br>
</div>