Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider alternative to in_temporary_directory #118

Open
casey opened this issue Jul 22, 2021 · 0 comments
Open

Consider alternative to in_temporary_directory #118

casey opened this issue Jul 22, 2021 · 0 comments

Comments

@casey
Copy link
Collaborator

casey commented Jul 22, 2021

I think that in_temporary_directory has some downsides:

  • It requires that tests not run in parallel. This isn't a problem now, but if the tests got more numerous or slower, it could be come one.
  • Tests that want to get or set the current directory need to use in_temporary_directory. If other tests didn't modify in_temporary_directory, then only those tests that needed to set the current dir would need to use something, which I think is the default expectation.

One nice thing about in_temporary_directory is that cmd! invocations are as close as possible to what users would be doing, and no extra mechanisms are in-use which might cause behavior to be different, or to cause unrelated tests to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant