Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid unsafe assumptions about tempdir content in tests
test_new_should_raise_on_invalid_repo_location had previously used tempfile.gettempdir() directly to get a path assumed not to be a valid repository, assuming more than necessary about the directory in which temporary files and directories are created. A newly created temporary directory is now used for that check, instead. test_new_should_raise_on_non_existent_path had assumed no repos/foobar existed relative to the current directory. Typically there would be no such directory, but is unnecessary for the test to rely on this. A newly created temporary directory known to be empty is now used in place of the "repos" component, for that test.
- Loading branch information