<br><br><div class="gmail_quote">On Tue, Jan 19, 2010 at 10:37 AM, Alfredo Deza <span dir="ltr">&lt;<a href="mailto:arufuredosan@gmail.com">arufuredosan@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I am building some tests for a Python installer that copies some files and changes some permissions.<br><br>Nothing weird there.<br><br>However, in the test class I am starting with a setUp that basically calls the installer (so the tests can see if everything is where it should be), this is followed by a few assertions and finally a tearDown is called where everything gets uninstalled.<br>

<br>When running the tests with nosetests, I see that setUp and tearDown are called for *every* method in my test class (e.g. installs =&gt; runs test method =&gt; uninstalls ....)<br><br>Isn&#39;t setUp supposed to be run once at the beginning of the class? or is this expected?<br>

<br>In case this is expected, is there a way to do it <b>just once </b>for all the methods?<br><br><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>
<br></blockquote></div><br><div>Maybe you need module level setup / teapDown func.</div>