On 11/29/10 4:59 AM, Wichert Akkerman wrote: > In one project I am seeing a number of test failures that are very odd: > > Error in test runTest > (euphorie.deployment.tests.functional.EuphorieFunctionalTestCase) > Traceback (most recent call last): > File > "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", > > line 279, in run > testMethod() > TypeError: 'NoneType' object is not callable > > > This appears to have once for every testmodule which imports my > functional test base class. The class itself is really simple: > > class EuphorieFunctionalTestCase(PloneTestCase.FunctionalTestCase): > layer = EuphorieLayer > > def adminBrowser(self): > """Return a browser logged in as the site owner.""" > ... > > I'm afraid I have no idea why this happens. Has anyone seen this kind of > behaviour before? Yes. This runTest method is added by Testing.ZopeTestCase.zopedoctest.functional.ZopeSuiteFactory's setup_test_class. So if you use a test class with one of the suites based on that (e.g. ZopeDocFileSuite, FunctionalDocFileSuite), and also try to use it with unittest autodiscovery, you'll get this error. I worked around it by defining a separate test case class for my Zope doctest suites. ---------- David Glick Web Developer [email protected] 206.286.1235x32
Groundwire: You Are Connected http://groundwire.org Online tools and strategies for the environmental movement. Sign up for Groundwire News! http://groundwire.org/email-capture Check out our 2010 Website Benchmarks Report. How do you stack up? http://groundwire.org/resources/articles/2010-website-benchmarks-report _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
