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

Use register_assert_rewrite to enable introspection in assertion helper. #9273

Merged
merged 1 commit into from Jan 30, 2018

Conversation

Projects
None yet
3 participants
@jgraham
Copy link
Contributor

jgraham commented Jan 30, 2018

Pytest by default only loads test modules, and enables assert
introspection for them. For any helper method which also uses
asserts, only a plain assertion is printed.

To enable introspection also for the assertion helper, the
module has to be registered for assertion rewrite.

MozReview-Commit-ID: 97JzuykXxWE

Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1433390 [ci skip]


This change is Reviewable

Use register_assert_rewrite to enable introspection in assertion helper.
Pytest by default only loads test modules, and enables assert
introspection for them. For any helper method which also uses
asserts, only a plain assertion is printed.

To enable introspection also for the assertion helper, the
module has to be registered for assertion rewrite.

MozReview-Commit-ID: 97JzuykXxWE

Upstreamed from https://bugzilla.mozilla.org/show_bug.cgi?id=1433390 [ci skip]
@jgraham

This comment has been minimized.

Copy link
Contributor Author

jgraham commented Jan 30, 2018

Code reviewed upstream.

@jgraham jgraham merged commit 8921d65 into master Jan 30, 2018

@jgraham jgraham deleted the sync_a83b62f71c0146c33d0a32460c81104ce42ec8ba branch Jan 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.