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:

http://packages.python.org/testfixtures/mocking.html

cheers,

Chris

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

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to