Skip to content

Implement verify_output()#906

Merged
hadley merged 2 commits intomasterfrom
verify-output
Jul 19, 2019
Merged

Implement verify_output()#906
hadley merged 2 commits intomasterfrom
verify-output

Conversation

@hadley
Copy link
Copy Markdown
Member

@hadley hadley commented Jul 18, 2019

Goal is to create a new regression test focussed on human readable output

Fixes #782. Fixes #834.

Comment thread DESCRIPTION Outdated
vctrs (>= 0.1.0),
xml2
xml2,
testthat (>= 2.1.0)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This may not hurt anything, but it is kind of weird for testthat to Suggest itself.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ooops, I guess we need to special case use_test()

})

test_that("can't record plots", {
expect_error(verify_output("path", plot(1:10)), "Plots")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This test opens a plot window, not sure the best way to avoid this and still run this test.

"Output"
1 + 2
invisible(1:10)
12345678 + 12345678 + 12345678 + 12345678 + 12345678 + 12345678 +
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Setting the width option must need to be moved slightly, as with a larger width option this output is different.

@hadley hadley merged commit 38f08b4 into master Jul 19, 2019
@hadley hadley deleted the verify-output branch July 19, 2019 17:43
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.

Regression versus failure expect_known_results

2 participants