[Product-Developers] Added tests won't run

Kevin Harvey kevin.harvey at vanderbilt.edu
Thu Sep 4 13:38:58 UTC 2008


Super noob question here: I'm working through Martin Aspeli's book
Professional Plone Development and, like a good programmer, I'm starting to
learn unit testing. When I first add the test_setup.py and base.py files
everything is fine and the tests run properly ('Ran 2 tests with 2 failures
and 0 errors'). However, as I've progressed through the book and added new
tests to my test_setup.py file, the new tests won't run. For instance, in
Chapter 6 (p. 98-99) we add 6 new tests. I modified the code and then did:

bin/instance test -s optilux.policy

After all of the usual output, I get this:

Ran 2 tests with 0 failures and 0 errors

So I checked the code from the Packt website. I cleaned up a couple typing
errors, ran the test again, and got the exact same result. Then, I deleted
my test_setup.py and put the one from the example code in. After running the
tests again, I get:

Ran 8 tests with 6 failures and 0 errors

Anyone have any idea why that might be? I've continued through the book and
the same problem continues as I add new tests, always righting itself when I
copy in the example test_setup.py. I know it's something stupid I'm doing. 

FWIW, here's my system:

Plone 3.1.2
Zope 2.10.6
Python 2.4.5
Ubuntu 7.10

Thanks,
Kevin
-- 
View this message in context: http://n2.nabble.com/Added-tests-won%27t-run-tp838823p838823.html
Sent from the Product Developers mailing list archive at Nabble.com.





More information about the Product-Developers mailing list