I'm also seeing this, as a result of using the 'in' operator on a mock in Python 2.6.
Failed example:
'hi' in container # doctest: +ELLIPSIS
Exception raised:
Traceback (most recent call last):
File "/usr/lib64/python2.6/doctest.py", line 1231, in __run compileflags, 1) in test.globs
File "<doctest mock_container.txt[8]>", line 1, in <module>
'hi' in container # doctest: +ELLIPSIS
TypeError: __nonzero__ should return bool or int, returned Mock
I'm also seeing this, as a result of using the 'in' operator on a mock in Python 2.6.
Failed example: python2. 6/doctest. py", line 1231, in __run
compileflags, 1) in test.globs txt[8]> ", line 1, in <module>
'hi' in container # doctest: +ELLIPSIS
Exception raised:
Traceback (most recent call last):
File "/usr/lib64/
File "<doctest mock_container.
'hi' in container # doctest: +ELLIPSIS
TypeError: __nonzero__ should return bool or int, returned Mock