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

Clean up test output by capturing $stderr when we expect warnings #894

Merged
merged 1 commit into from
Jan 10, 2020

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Jan 10, 2020

I just noticed while running tests that we produce some accidental
output because both of Source#source_transactions and
SubscriptionItem#usage_record_summaries are considered deprecated and
have warnings attached.

Here we capture output to $stderr and assert on it from the test cases
that call these deprecated methods -- this pattern is already well
established elsewhere in the test suite.

r? @ob-stripe
cc @stripe/api-libraries

I just noticed while running tests that we produce some accidental
output because both of `Source#source_transactions` and
`SubscriptionItem#usage_record_summaries` are considered deprecated and
have warnings attached.

Here we capture output to `$stderr` and assert on it from the test cases
that call these deprecated methods -- this pattern is already well
established elsewhere in the test suite.
@brandur-stripe
Copy link
Contributor

TY!

@brandur-stripe brandur-stripe merged commit fd71c5f into master Jan 10, 2020
@brandur-stripe brandur-stripe deleted the brandur-clean-test-output branch January 10, 2020 00:57
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.

3 participants