<br><div><span class="gmail_quote">On 2/28/07, <b class="gmail_sendername">jason pellerin</b> &lt;<a href="mailto:jpellerin@gmail.com">jpellerin@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 2/28/07, bear &lt;<a href="mailto:bear42@gmail.com">bear42@gmail.com</a>&gt; wrote:<br>&gt; One of the features I was adding to our custom test runner required me<br>&gt; building a list of all tests.&nbsp;&nbsp;I had created my own test loader that made a
<br>&gt; copy of the found TestCase objects.<br>&gt;<br>&gt; Is there a way for me to access the test list within nose?<br><br>Not with the current version. The loading is all very lazy, so the<br>list of tests that will be run is only know once the tests have all
<br>been run. Future versions (0.10 specifically) will be better about<br>this, but future versions are a long way off.<br><br>Of course you can do nosetest -v and get a list of all the tests that<br>were run, but I don&#39;t think that&#39;s what you&#39;re after... Maybe if you
<br>can describe a bit what you need the test list for, I can suggest some<br>better options.<br></blockquote></div><br>What we are doing is giving the developer the normal &quot;run all unit tests&quot; option which runs them all using the same python instance that was used to start nose.&nbsp; But a request was made to also be able to gather the list of tests and then start each test in its own python - that way any errant code won&#39;t pollute the environment for downstream tests.
<br><br>So what I have done is run the loader code to build a list of TestCase instances and then cycle thru that list calling &quot;python run_test &lt;insert name of test here&gt;&quot;<br><br>We realize that we shouldn&#39;t have tests that cause such pollution but once we found one that did we wanted a way to verify a test run failed but not because of the environment (I hope that makes sense.)
<br><br>Having read the code just now it looks like I can use my custom test loader in the same way with nose.<br><br>