Closed nealrichardson closed 3 years ago
why not use testthat::test_path()
?
(but in any case I do like the improvement, it'll be useful for debugging I think!)
why not use
testthat::test_path()
?
It could work, though it's more restrictive. It requires paths to be inside tests/testthat
and can error. It wasn't suitable for .mockPaths()
for those reasons, but maybe it would be ok in this case?
Ah right, could there be use cases of with_mock_dir() outside of tests? 🤔
I'm not sure, but if we can support both interactive testing and using it outside of tests, IMO it's worth a shot. I'll merge this and we can switch to test_path later if we find a reason to.
cc @maelle, any thoughts on this?