httptest
httptest copied to clipboard
Use absolute paths for .mockPaths() for tests using a temporary directory?
If a test sets a temporary directory like so https://github.com/maelle/setwdsetwd/blob/main/tests/testthat/test-request.R then no mock directory is set in the actual package.
If I comment out the line with withr::local_dir(tempdir)
then a mock dir is created.
My real use case consists in testing a package that is used for package development, therefore most tests use throwaway packages, and most functions work on the current directory so I really need to change the working directory.
I think this problem might affect httptest2 too.
This issue reminds me of https://github.com/r-lib/testthat/issues/1359