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

Unify as.data.frame structure for empty testthat_results #887

Merged
merged 1 commit into from
Jul 16, 2019
Merged

Unify as.data.frame structure for empty testthat_results #887

merged 1 commit into from
Jul 16, 2019

Conversation

jozefhajnala
Copy link
Contributor

This PR proposes to unify the "return type" of as.data.frame.testthat_results() to a data frame with 13 columns with predefined names, regardless of whether the input object is of length 0.

Context and motivation

I often use testthat results in a CI context, where combining (i.e. rbinding) the results of tests for multiple packages into 1 data frame is quite useful. It happens sometimes that one of those objects is empty, in which case as.data.frame(testResults) returns a 0 x 0 data frame, requiring further manipulation if we want to apply unified methods.

Copy link
Member

@hadley hadley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a bullet to NEWS? It should briefly describe the change and end with (@yourname, #issuenumber).

@hadley hadley merged commit f748870 into r-lib:master Jul 16, 2019
@hadley
Copy link
Member

hadley commented Jul 16, 2019

Thanks!

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.

2 participants