On 11/30/10 18:14 , David Glick wrote: > On 11/30/10 12:29 AM, Wichert Akkerman wrote: >> On 11/29/10 19:09 , David Glick wrote: >>> 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. >> Can you show us what your test case class looks like? > Nothing special about it; it just subclasses the main test case class > and passes -- > http://svn.plone.org/svn/collective/collective.megaphone/trunk/src/collective/megaphone/tests/base.py
I tried that, but unfortunately it made no difference. Wichert. _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
