You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
import unittest
import mox
class Foo(object):
@classmethod
def some_method(cls):
pass
class TestFoo(mox.MoxTestBase):
def setUp(self):
super(TestFoo, self).setUp()
self.mox.StubOutWithMock(Foo, 'some_method')
def test_some_method_is_called(self):
Foo.some_method()
self.mox.ReplayAll()
if __name__ == '__main__':
unittest.main()
What do you see?
python test.py
F
======================================================================
FAIL: test_some_method_is_called (__main__.TestFoo)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/kparmar/sources/pymox/mox.py", line 2120, in new_method
mox_obj.VerifyAll()
File "/Users/kparmar/sources/pymox/mox.py", line 318, in VerifyAll
mock_obj._Verify()
File "/Users/kparmar/sources/pymox/mox.py", line 559, in _Verify
raise ExpectedMethodCallsError(self._expected_calls_queue)
ExpectedMethodCallsError: Verify: Expected methods never called:
0. instancemethod.__call__() -> None
Please provide any additional information below.
With the changes made from the patch, the output is -
python test.py
F
======================================================================
FAIL: test_some_method_is_called (__main__.TestFoo)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/kparmar/sources/pymox/mox.py", line 2120, in new_method
mox_obj.VerifyAll()
File "/Users/kparmar/sources/pymox/mox.py", line 318, in VerifyAll
mock_obj._Verify()
File "/Users/kparmar/sources/pymox/mox.py", line 559, in _Verify
raise ExpectedMethodCallsError(self._expected_calls_queue)
ExpectedMethodCallsError: Verify: Expected methods never called:
0. Foo.some_method.__call__() -> None
Original issue reported on code.google.com by [email protected] on 18 Nov 2012 at 2:42
Original issue reported on code.google.com by
[email protected]
on 18 Nov 2012 at 2:42Attachments:
The text was updated successfully, but these errors were encountered: