Because helper.R is always sourced before running a test_ file.
IMO if {mlr3pipelines} is required for the tests, it is better to put the library() call in tests/testthat.R -- this is the first place a reader will look for test requirements.
If it's indeed optional, I would remove the library() call in helper.R.
These two lines are contradictory:
https://github.com/mlr-org/mlr3tuning/blob/4b6c958659b20d1c96cc7b7e46117b97df922d33/tests/testthat/helper.R#L4
https://github.com/mlr-org/mlr3tuning/blob/4b6c958659b20d1c96cc7b7e46117b97df922d33/tests/testthat/test_Tuner.R#L72
Because helper.R is always sourced before running a
test_
file.IMO if {mlr3pipelines} is required for the tests, it is better to put the
library()
call intests/testthat.R
-- this is the first place a reader will look for test requirements.If it's indeed optional, I would remove the
library()
call in helper.R.