Testthat: Reconsider directory layout

Created on 18 May 2017  路  5Comments  路  Source: r-lib/testthat

(i.e. the working directory needs to be the project root)

This needs to be a long term plan, but would make testthat more consistent with other packages. Would need to start by emitting warnings so that R CMD check doesn't fail, but you're encouraged to update your tests.

feature

All 5 comments

It might be possible to do this as part of a bigger behaviour switch:

  • Put tests directly in tests/
  • Eliminate use of context()
  • Don't use reporters for R CMD check
  • Eliminate bare expectations

I like the idea of putting tests under tests, but why do we need to eliminate bare expectations?

Just because it adds a bunch of extra code and I鈥檇 rather push people towards one consistent style. I might be wrong.

context() is no longer necessary as of 2.1.0

Superseded by #1027

Was this page helpful?
0 / 5 - 0 ratings