This problem happens to break coverage reporting with zope.testing as well (the --coverage option to zc.recipe.testrunner). Here is the traceback:
$ ./bin/test plone.dexterity --coverage=coverage
Running zope.testing.testrunner.layer.UnitTests tests:
Set up zope.testing.testrunner.layer.UnitTests in 0.000 seconds.
Running:
35/138 (25.4%)Traceback (most recent call last):
File "/Users/optilude/Development/Plone/Code/Build/dexterity/bin/test", line 224, in ?
zope.testing.testrunner.run((['--exit-with-status', '--auto-color', '--auto-progress']) + [
File "/Users/optilude/.buildout/eggs/zope.testing-3.8.0-py2.4.egg/zope/testing/testrunner/__init__.py", line 32, in run
failed = run_internal(defaults, args)
File "/Users/optilude/.buildout/eggs/zope.testing-3.8.0-py2.4.egg/zope/testing/testrunner/__init__.py", line 45, in run_internal
runner.run()
File "/Users/optilude/.buildout/eggs/zope.testing-3.8.0-py2.4.egg/zope/testing/testrunner/runner.py", line 137, in run
self.run_tests()
File "/Users/optilude/.buildout/eggs/zope.testing-3.8.0-py2.4.egg/zope/testing/testrunner/runner.py", line 215, in run_tests
setup_layers, self.failures, self.errors)
File "/Users/optilude/.buildout/eggs/zope.testing-3.8.0-py2.4.egg/zope/testing/testrunner/runner.py", line 371, in run_layer
return run_tests(options, tests, layer_name, failures, errors)
File "/Users/optilude/.buildout/eggs/zope.testing-3.8.0-py2.4.egg/zope/testing/testrunner/runner.py", line 304, in run_tests
test(result)
File "/opt/python/parts/opt/lib/python2.4/unittest.py", line 281, in __call__
return self.run(*args, **kwds)
File "/Users/optilude/.buildout/eggs/mocker-0.10.1-py2.4.egg/mocker.py", line 136, in run_wrapper
self.__cleanup()
File "/Users/optilude/.buildout/eggs/mocker-0.10.1-py2.4.egg/mocker.py", line 152, in __cleanup
self.mocker.restore()
File "/Users/optilude/.buildout/eggs/mocker-0.10.1-py2.4.egg/mocker.py", line 449, in restore
event.restore()
File "/Users/optilude/.buildout/eggs/mocker-0.10.1-py2.4.egg/mocker.py", line 1584, in restore
def restore(self):
File "/opt/python/parts/opt/lib/python2.4/trace.py", line 592, in globaltrace_lt
ignore_it = self.ignore.names(filename, modulename)
File "/Users/optilude/.buildout/eggs/zope.testing-3.8.0-py2.4.egg/zope/testing/testrunner/coverage.py", line 98, in names
filename = self._filenameFormat(filename)
File "/Users/optilude/.buildout/eggs/zope.testing-3.8.0-py2.4.egg/zope/testing/testrunner/coverage.py", line 111, in _filenameFormat
return os.path.abspath(filename)
File "/opt/python/parts/opt/lib/python2.4/posixpath.py", line 402, in abspath
if not isabs(path):
TypeError: __nonzero__ should return bool or int, returned Mock
This problem happens to break coverage reporting with zope.testing as well (the --coverage option to zc.recipe. testrunner) . Here is the traceback:
$ ./bin/test plone.dexterity --coverage=coverage testrunner. layer.UnitTests tests: testrunner. layer.UnitTests in 0.000 seconds. optilude/ Development/ Plone/Code/ Build/dexterity /bin/test" , line 224, in ? testing. testrunner. run(([' --exit- with-status' , '--auto-color', '--auto-progress']) + [ optilude/ .buildout/ eggs/zope. testing- 3.8.0-py2. 4.egg/zope/ testing/ testrunner/ __init_ _.py", line 32, in run defaults, args) optilude/ .buildout/ eggs/zope. testing- 3.8.0-py2. 4.egg/zope/ testing/ testrunner/ __init_ _.py", line 45, in run_internal optilude/ .buildout/ eggs/zope. testing- 3.8.0-py2. 4.egg/zope/ testing/ testrunner/ runner. py", line 137, in run run_tests( ) optilude/ .buildout/ eggs/zope. testing- 3.8.0-py2. 4.egg/zope/ testing/ testrunner/ runner. py", line 215, in run_tests optilude/ .buildout/ eggs/zope. testing- 3.8.0-py2. 4.egg/zope/ testing/ testrunner/ runner. py", line 371, in run_layer optilude/ .buildout/ eggs/zope. testing- 3.8.0-py2. 4.egg/zope/ testing/ testrunner/ runner. py", line 304, in run_tests parts/opt/ lib/python2. 4/unittest. py", line 281, in __call__ optilude/ .buildout/ eggs/mocker- 0.10.1- py2.4.egg/ mocker. py", line 136, in run_wrapper __cleanup( ) optilude/ .buildout/ eggs/mocker- 0.10.1- py2.4.egg/ mocker. py", line 152, in __cleanup mocker. restore( ) optilude/ .buildout/ eggs/mocker- 0.10.1- py2.4.egg/ mocker. py", line 449, in restore optilude/ .buildout/ eggs/mocker- 0.10.1- py2.4.egg/ mocker. py", line 1584, in restore parts/opt/ lib/python2. 4/trace. py", line 592, in globaltrace_lt names(filename, modulename) optilude/ .buildout/ eggs/zope. testing- 3.8.0-py2. 4.egg/zope/ testing/ testrunner/ coverage. py", line 98, in names ormat(filename) optilude/ .buildout/ eggs/zope. testing- 3.8.0-py2. 4.egg/zope/ testing/ testrunner/ coverage. py", line 111, in _filenameFormat abspath( filename) parts/opt/ lib/python2. 4/posixpath. py", line 402, in abspath
Running zope.testing.
Set up zope.testing.
Running:
35/138 (25.4%)Traceback (most recent call last):
File "/Users/
zope.
File "/Users/
failed = run_internal(
File "/Users/
runner.run()
File "/Users/
self.
File "/Users/
setup_layers, self.failures, self.errors)
File "/Users/
return run_tests(options, tests, layer_name, failures, errors)
File "/Users/
test(result)
File "/opt/python/
return self.run(*args, **kwds)
File "/Users/
self.
File "/Users/
self.
File "/Users/
event.restore()
File "/Users/
def restore(self):
File "/opt/python/
ignore_it = self.ignore.
File "/Users/
filename = self._filenameF
File "/Users/
return os.path.
File "/opt/python/
if not isabs(path):
TypeError: __nonzero__ should return bool or int, returned Mock