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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve failure message for invocations received in the wrong order #633

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

floehopper
Copy link
Member

I think there's more we could do in this area, but this implements @dchelimsky's suggestion which is definitely an improvement.

If an invocation was unexpected because, although there is an expectation that expectation does not match due to an ordering constraint, then append "invoked out of order" to the failure message.

e.g.

unexpected invocation: #<Mock:mock>.foo() invoked out of order

Closes #60 (only 11 years late! 馃槄)

I think there's more we could do in this area, but this implements
@dchelimsky's suggestion which is definitely an improvement.

If an invocation was unexpected because, although there is an
expectation that expectation does not match due to an ordering
constraint, then append "invoked out of order" to the failure message.

e.g.

    unexpected invocation: #<Mock:mock>.foo() invoked out of order

Closes #60 (only 11 years late!馃槄)
@floehopper floehopper changed the title Improve sequence failure message Improve failure message for invocations received in the wrong order Nov 18, 2023
@floehopper floehopper merged commit 0800c6f into main Nov 18, 2023
16 checks passed
@floehopper floehopper deleted the improve-sequence-failure-message branch November 18, 2023 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sequencing failure messages are unclear
1 participant