Commit ad570de
committed
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.1 parent d7bf231 commit ad570de
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
0 commit comments