unittest inconsistent

Chris Withers chris at simplistix.co.uk
Tue Jan 12 09:15:43 CET 2010

Phlip wrote:
>> The reason the 'Tester' object has no attribute 'arg1' is because
>> "self" still refers to the object made for testA.
> I hope someone else can spot the low-level reason...
> ...but why aren't you using http://pypi.python.org/pypi/mock/ ? Look
> up its patch_object facility...

Indeed, I love mock, although I prefer testfixture replace decorator 
and/or context manager for installing and removing them:




Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk

More information about the Python-list mailing list