[TIP] Need help with IsolationPlugin and nose 0.10 API

Kumar McMillan kumar.mcmillan at gmail.com
Mon Mar 31 16:27:40 PDT 2008

Hi Brandon.
from your Active State comment
it looks like what you are actually trying to do is re-run your suite
after the code has changed, correct?

The isolation plugin is kind of overkill for this because it uses a
separate process for *each* test, thus slowing down the test suite
considerably.  Another approach might be to drive a nosetests
subprocess that calls nose.run() and exits [1].  This would mean you'd
have to scrape the output but you'd probably have to do that anyway
unless you are introspecting the unittest TestResult (which would be
painful).  Alternatively, you could submit a feature request asking
for a way to "clear" all test suites from memory:
...this shouldn't be too hard (famous last words:)).


[1] I did this once and it worked just fine:

On Mon, Mar 31, 2008 at 12:14 PM, Brandon Corfman <bcorfman at fastmail.fm> wrote:
> Hi everyone --
>  I'm using the nose 0.10 API to drive some unit tests, and I'm using
>  the IsolationPlugin so my test modules get reloaded each time
>  I call nose.run(). So far, all of my unit tests are contained in one
>  module
>  using classes that derive from unittest.TestCase, but I have one simple
>  test in the same module that is just a function, e.g.
>  def testSimple():
>      assert(1 == 1)
>     # I change this to 'assert(1 == 0)' after the first run to test the
>  IsolationPlugin
>  All my TestCase-derived classes get reloaded each time I use nose.run()
>  with the '--with-isolation' argument, but I can see that the simple
>  function like the one above doesn't get reloaded and gives stale
>  information after the first run. How can I correct this?
>  Thanks,
>  Brandon
>  _______________________________________________
>  testing-in-python mailing list
>  testing-in-python at lists.idyll.org
>  http://lists.idyll.org/listinfo/testing-in-python

More information about the testing-in-python mailing list