Z

Zope

kirr's Zope tree

  • Maurits van Rees's avatar
    Fixed dummy runTest on functional test case. (#89) · ecfd7b1b
    Maurits van Rees authored
    In functional doc tests you can apparently have a test case that has
    no runTest method.  Until now the Testing package added a dummy
    runTest method in that case, and set it to None.
    
    But when this dummy runTest method gets called, you get an error:
    
      Error in test runTest (Testing.ZopeTestCase.ZopeTestCase.FunctionalTestCase)
      Traceback (most recent call last):
        File ".../lib/python2.7/unittest/case.py", line 329, in run
          testMethod()
      TypeError: 'NoneType' object is not callable
    
    Simply importing Testing.ZopeTestCase.FunctionalTestCase in a new test
    file may be enough to trigger this.
    
    So this has something to do with the order in which tests are found.
    
    I fixed it by making the dummy runTest method callable.
    ecfd7b1b
Name
Last commit
Last update
doc Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
COPYRIGHT.txt Loading commit data...
LICENSE.txt Loading commit data...
MANIFEST.in Loading commit data...
README.txt Loading commit data...
bootstrap.py Loading commit data...
buildout.cfg Loading commit data...
setup.cfg Loading commit data...
setup.py Loading commit data...
sources.cfg Loading commit data...
version_ranges.cfg Loading commit data...
ztk-versions.cfg Loading commit data...