Just a follow-up.<div><br></div><div>I made a mistake not including the files. <div>The repo is updated: <a href="https://bitbucket.org/yeukhon/bitbucket-python-api/src/18ddb36b9c7c7297398a6e97b889ddfc9b5e5ae8/tests/small?at=default">https://bitbucket.org/yeukhon/bitbucket-python-api/src/18ddb36b9c7c7297398a6e97b889ddfc9b5e5ae8/tests/small?at=default</a></div>
<div><br></div><div>Simple version:</div><div><br></div><div><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)">Basically, I wanted to add a new test class. </span></div>
<div><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)">The new test case in that class is </span><code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;color:rgb(68,68,68);line-height:17px">test_account_creation</code><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)">. </span></div>
<div><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)"><br></span></div><div><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)">I ran nosetests on all of them. It took 15 seconds. Wow. </span></div>
<div><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)"><br></span></div><div><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)">I commented that test case out, it was running about 1 second. Okay. That&#39;s what I meant when test_account_creation exist or deleted. I gave the results when</span><code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;color:rgb(68,68,68);line-height:17px">autospec=True/False</code><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)"> in the patch (see base.py), and results when the new test case</span><code style="margin:0px;padding:1px 5px;border:0px;font-size:13px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;color:rgb(68,68,68);line-height:17px">test_account_creation</code><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)"> was un/commented.</span></div>
<div><font color="#444444" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:17px"><br></span></font></div><div><font color="#444444" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:17px"><br>
</span></font>Thanks.</div><div><br></div><div><br><div class="gmail_quote">On Tue, Mar 5, 2013 at 10:57 PM, John Wong <span dir="ltr">&lt;<a href="mailto:gokoproject@gmail.com" target="_blank">gokoproject@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">HI,<div><br></div><div>Thanks for all the help so far.</div><div><br></div><div>Here is the repo: <a href="https://bitbucket.org/yeukhon/bitbucket-python-api/src/6e57e95d5d09/tests/small?at=default" target="_blank">https://bitbucket.org/yeukhon/bitbucket-python-api/src/6e57e95d5d09/tests/small?at=default</a></div>

<div><br></div><div>I have a base unit test class in base.py.  For test_bitbucket.py, I inherit from the base unit test class.</div><div>I want to add new test cases and classes to test_bitbucket.py While doing so, I discovered performance issue.</div>

<div><br></div><div>I ran `nosetests` inside tests/small and I am getting these mix results</div><div><br></div><div><br></div><div>Ran 18 tests in 14.523s        - autospec=True and test_account_creation exists</div><div>

<div><br></div></div><div>Ran 18 tests in 0.621s         - autospec=False and test_account_creation_exists</div><div><br></div><div><br></div><div>Ran 17 tests in 1.081s         - autospec=True and test_account_creation is deleted</div>

<div><br></div><div><div>Ran 17 tests in 0.090s         - autospec=False, and test_account_creation is deleted</div></div><div><br></div><div><br></div><div>I understand requests is a big library, but the performance hit is crazy, going from 1.1s to 14.5s with and without the new test class, respectively.</div>

<div><br></div><div>Interestingly, if we run test_bitbucket.py individually.</div><div><br></div><div><div>(bbpy)yeukhon@yeukhon-P5E-VM-DO:~/hg/bitbucket-python-api/tests/small$ nosetests test_bitbucket.py</div><div>...</div>

<div>----------------------------------------------------------------------</div><div>Ran 3 tests in 0.090s</div><div><br></div><div>OK</div></div><div><br></div><div><br></div><div>Pretty much the same with/without autospec on.</div>

<div><br></div><div>Any idea? I don&#39;t know enough about nosetests internal.</div><div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>John</div>
</font></span></blockquote></div><br></div></div>