What steps will reproduce the problem?
Mock a given method that has a long and complex signature, and have the
actual call to the mock not match the recorded call.
mock_my_object = self.mox.CreateMock(MyObject)
mock_my_object.SomeComplexMethod(1, 2, 3, 4, 5, 6).AndReturn(True)
self.mox.ReplayAll()
self.assertTrue(mock_my_object.SomeComplexMethod(1, 2, 3, 4, 5, 6, 7))
What is the expected output? What do you see instead?
I would hope that Mox would more elegantly print where the discrepancy in
the method calls is---e.g., "Unequal number of arguments between recorded
and called method: 1 extra argument provided." for the case above.
Something like this would be nice:
Expected <MyObject mock>.SomeComplexMethod(1, 2, 3, 4, 5, 6)
Actual <MyObject mock>.SomeComplexMethod(1, 2, 3, 4, 5, 6, 7)
Extra parameter /|\
What version of the product are you using? On what operating system?
0.5.0 on Linux.
Please provide any additional information below.
It can be really hard to read the discrepancy reports of the current
version.
Original issue reported on code.google.com by matt.proud@gmail.com on 9 Mar 2009 at 9:11
Original issue reported on code.google.com by
matt.proud@gmail.com
on 9 Mar 2009 at 9:11