Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better formatting expected vs. actual method call #20

Open
ivancrneto opened this issue Jan 6, 2024 · 0 comments
Open

Better formatting expected vs. actual method call #20

ivancrneto opened this issue Jan 6, 2024 · 0 comments
Labels
good first issue Good for newcomers question Further information is requested

Comments

@ivancrneto
Copy link
Owner

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.create_mock(MyObject)
mock_my_object.some_complex_method(1, 2, 3, 4, 5, 6).returns(True)
self.mox.replay_all()

assert mock_my_object.some_complex_method(1, 2, 3, 4, 5, 6, 7))

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 /|\

Check if this is still the case.

@ivancrneto ivancrneto added question Further information is requested good first issue Good for newcomers labels Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant