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

@jozefhajnala jozefhajnala commented Jun 18, 2019

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.

hadley
hadley approved these changes Jul 15, 2019
Copy link
Member

@hadley hadley left a comment

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

Loading

@hadley hadley merged commit f748870 into r-lib:master Jul 16, 2019
1 of 2 checks passed
Loading
@hadley
Copy link
Member

@hadley hadley commented Jul 16, 2019

Thanks!

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants