Labels: Type-Defect Priority-Medium
New issue 54 by akes...@google.com
: StubOutWithMock on a MockAnything
sometimes succeeds, sometimes fails.
What steps will reproduce the problem?
1. Create a source file mox_restub.py, with the following contents:
print MyClass.MyFunction # <unbound method MyClass.MyFunction>
print MyClass.MyFunction # <MockAnything instance at 139942970002032>
print MyClass.MyFunction # <MockAnything instance at 139942970064208>
# TypeError: Cannot Mock a MockAnything! Did you
# remember to call UnsetStubs in your previous
2. run python ./mox_restub.py
What is the expected output? What do you see instead?
I expect an exception to be thrown at the second call to StubOutWithMock,
since MyClass.MyFunction is already a MockAnything that has not been unset
Instead, the second call to StubOutWithMock silently succeeds, but the
third call fails.
What version of the product are you using? On what operating system?
mox: python-mox 0.5.3-1ubuntu5
os: Ubuntu 12.04.1 LTS
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at: