[Checkins] [zopefoundation/Zope] bb5b1b: Fixed dummy runTest on functional test case.
GitHub
noreply at github.com
Wed Jan 18 03:04:45 CET 2017
Branch: refs/heads/fix-dummy-runtest-213
Home: https://github.com/zopefoundation/Zope
Commit: bb5b1b54d18d776b895285755cf46ce211edd712
https://github.com/zopefoundation/Zope/commit/bb5b1b54d18d776b895285755cf46ce211edd712
Author: Maurits van Rees <maurits at vanrees.org>
Date: 2017-01-18 (Wed, 18 Jan 2017)
Changed paths:
M src/Testing/ZopeTestCase/zopedoctest/functional.py
Log Message:
-----------
Fixed dummy runTest on functional test case.
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.
The previous commit added a functional test case. Somehow this caused
a problem in an unknown other functional test case because the dummy
runTest method got called:
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
It was not even caused by anything in the new tests: simply importing
was enough to trigger it:
from Testing.ZopeTestCase import FunctionalTestCase
So this has something to do with the order in which tests are found.
I fixed it by making the dummy runTest method callable.
More information about the checkins
mailing list