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

Comments

Projects
None yet
2 participants
@wch
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

This comment has been minimized.

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 in b7b25b8 Sep 17, 2014

@hadley

This comment has been minimized.

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 Sep 17, 2014

@wch

This comment has been minimized.

Member

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