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

Display an optional message on test failure #59

Merged
merged 2 commits into from Jul 24, 2014
Merged

Conversation

emaadmanzoor
Copy link
Contributor

Here is a PR on adding an optional message to display on test failure. All the project's tests continue to pass after this change.

Let me know if there's anything additional required (documentation, tests) before this can be merged.

@jarus
Copy link
Owner

jarus commented Jul 23, 2014

This is a nice change. Thanks.
Maybe you could add a default message like "HTTP Status 200 expected but got 404". Can you please add a test to make sure that the defined message is included inside of the assertion.

@emaadmanzoor
Copy link
Contributor Author

Yes this message will be useful. I'll send in an updated PR with this and the test soon.

@jarus
Copy link
Owner

jarus commented Jul 23, 2014

Perfect with this addition. I can merge them and publish a new release.

@emaadmanzoor
Copy link
Contributor Author

I added a default assertion failure message, and two test cases to verify the default and a custom message.

@emaadmanzoor
Copy link
Contributor Author

The strange expected_message in e.args[0] check is for Python 3.x, where e.message has been deprecated and replaced with tuple e.args.

@jarus
Copy link
Owner

jarus commented Jul 24, 2014

Looks very well. Thank you.

jarus added a commit that referenced this pull request Jul 24, 2014
Display an optional message on test failure
@jarus jarus merged commit 9674f6f into jarus:master Jul 24, 2014
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.

None yet

2 participants