> > Also, the assertion should probably compare against a constant value that you
> > are expecting, 0 or 1 in this case, rather than len(instances) + 1.
> >
> The thing is we don't know that it will *always* be 1 or 0. We could start off
> with 15 running instances. Terminate one. Assert that the original
> instance_count is equal to the current instance count + 1.
Shouldn't those instances be torn down between each test case?
> If we were running
> Python 2.7's unittest, there is assertGreater, assertGreaterEqual, etc, but
> unfortunately those aren't available in 2.6.
Don't forget that you can always just use Python's built-in assert:
> > Also, the assertion should probably compare against a constant value that you
> > are expecting, 0 or 1 in this case, rather than len(instances) + 1.
> >
> The thing is we don't know that it will *always* be 1 or 0. We could start off
> with 15 running instances. Terminate one. Assert that the original
> instance_count is equal to the current instance count + 1.
Shouldn't those instances be torn down between each test case?
> If we were running
> Python 2.7's unittest, there is assertGreater, assertGreaterEqual, etc, but
> unfortunately those aren't available in 2.6.
Don't forget that you can always just use Python's built-in assert:
assert len(instances) > 0