On 8 August 2025 at 09:18, Dr Gregory Jefferis wrote: | The workaround is quite a dance because it means that I have to do a setup/teardown before my tests. I can do this once for the whole test suite, but then it means that I can't conveniently run individual tests during development. I have tens of separate tests using these files so running a setup/teardown for each individual test would require a significant amount of additional code tweaking.
Advertisement here: I use (and quite like) tinytest for its philosophy of 'it is just a script' which allows me precisely to test individual test file, or the whole directory, or the installed package, or ... Works for me, even after dozens of packages used and years of practice with it. Worth a try. So (riffing here, untested) I would add a simple 'if (!dir.exists(untarred)) untar_swc_files(untarred)' at the top of each test file. And by placing 'untarred' in an R temporary directory you get the cleanup for free. Now in real life there will be dragons but this may give you and idea for a start. Cheers, Dirk -- dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel