ropensci-review-tools / pkgcheck

Check whether a package is ready for submission to rOpenSci's peer-review system
https://docs.ropensci.org/pkgcheck/
18 stars 6 forks source link

rm vertical space in test files? #70

Closed maelle closed 3 years ago

maelle commented 3 years ago

I find them hard to read, e.g.

  expect_output (
    chk <- pkgcheck (d)
  )

could be

expect_output (chk <- pkgcheck (d) )

to see more content at once on the screen?

mpadge commented 3 years ago

Aha. I generally write tests so that the testthat expectations are on separate lines to the function calls themselves. I've gotten used to that, and now find that much easier to read than all-on-one-line. More so with string expectations like:

expect_message(function(x),
               "This is a message")

I find that the function(x) call gets lost there, and so started putting them on separate lines. That said, expectations that could be combined into single lines wouldn't be bad at all, so feel free to PR that, or I'll get on to it at some stage. Thanks

maelle commented 3 years ago

or maybe I'd already find test files easier to read with #67 + if

https://github.com/ropensci-review-tools/pkgcheck/blob/754a79b50287be9db8bc7e01dc3275498a3f85c6/tests/testthat/test-pkgcheck.R#L32-L46

were not that high (I do like the idea of clear line diffs though)

:thinking: