I have a Python module that I have set up with some unit testing code, which is simply a class that subclasses unittest.TestCase. Strangely, however, I am having some issues trying to call the code. Specifically, if I do the following:
<br><br>>>> from PyMC import MCMC<br>>>> MCMC.unittest.main()<br><br>----------------------------------------------------------------------<br>Ran 0 tests in 0.000s<br><br>OK<br><br>However, the following works:
<br><br>>>> from PyMC.MCMC import *<br>>>> unittest.main()<br><br>The unit test runs as expected. This seems odd, since the former should be the preferred syntax, as we are told the "from foo import *" syntax is to be avoided. 
<br><br>Any idea why this is not working as expected?<br><br>C.<br clear="all"><br>-- <br>Chris Fonnesbeck + Atlanta, GA + <a href="http://trichech.us">http://trichech.us</a>