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

expect_identical shouldn't always call all.equal() #165

Closed
wch opened this issue Sep 16, 2014 · 3 comments
Closed

expect_identical shouldn't always call all.equal() #165

wch opened this issue Sep 16, 2014 · 3 comments

Comments

@wch
Copy link
Member

wch commented Sep 16, 2014

This happens now due to some changes in R-devel:

library(testthat)
e <- new.env()
class(e) <- "foo"
expect_identical(e, e)
# Error in as.vector(x, "list") : 
#   cannot coerce type 'environment' to vector of type 'list'

But it might get fixed in R-devel...

@hadley
Copy link
Member

hadley commented Sep 17, 2014

Hmmmm, this might need some fundamental changes to testthat - currently both the failure and success messages are generated regardless of which occurs.

@hadley hadley closed this as completed in b7b25b8 Sep 17, 2014
@hadley
Copy link
Member

hadley commented Sep 17, 2014

Or I could just make the error message less informative.

@hadley hadley reopened this Sep 17, 2014
@hadley hadley closed this as completed Sep 17, 2014
@wch
Copy link
Member Author

wch commented Sep 17, 2014

A less-informative error message seems fine to me.

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

No branches or pull requests

2 participants