If you are using test_dir
or test_package
(otherwise you can just put the tests in the same file after the sqlite test), you can put your test that generates the table in its own file and use naming conventions for execution. For example, inside tests/run.R
you could have:
test_file("tests/testthat/myspecialfile.R")
test_dir("tests/testthat/") # will run every file with a name starting with `test`