Source of `not()`? #185

Closed
wibeasley opened this Issue Jan 3, 2014 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

wibeasley commented Jan 3, 2014

@wch, what package & version is the not() function from? This test isn't passing on my two machines. My libraries are up-to-date with CRAN, but I'm thinking this is using a development version of some package?

https://github.com/hadley/plyr/blame/master/inst/tests/test-revalue.r#L126

test_that("revalue and mapvalues respect warn_missing", {
  # revalue
  expect_that(revalue("a", c("a"="A")), not(shows_message()))
  expect_that(revalue("a", c("b"="B"), warn_missing=TRUE), shows_message())
  expect_that(revalue("a", c("b"="B"), warn_missing=FALSE), not(shows_message()))

  # mapvalues
  expect_that(mapvalues("a", "a", "A"), not(shows_message()))
  expect_that(mapvalues("a", "b", "B", warn_missing=TRUE), shows_message())
  expect_that(mapvalues("a", "b", "B", warn_missing=FALSE), not(shows_message()))

  # mapvalues with factors
  expect_that(mapvalues(factor("a"), "a", "A"), not(shows_message()))
  expect_that(mapvalues(factor("a"), "b", "B", warn_missing=TRUE), shows_message())
  expect_that(mapvalues(factor("a"), "b", "B", warn_missing=FALSE), not(shows_message()))
})
Owner

hadley commented Jan 3, 2014

It's the dev version of testthat

Contributor

wibeasley commented Jan 3, 2014

Great. Thanks.

wibeasley closed this Jan 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment