-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make_exp_dir incr exp dir if exp already exists to find a new exp dir…
… instead of erroring
- Loading branch information
1 parent
085127a
commit 0b85da6
Showing
2 changed files
with
38 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from boa import make_experiment_dir | ||
|
||
|
||
def test_make_new_exp_dir_when_exp_dir_already_exists(tmp_path): | ||
exp_name = "test_exp" | ||
kw = dict(output_dir=tmp_path, experiment_name=exp_name, append_timestamp=False, exist_ok=False) | ||
dirs = set() | ||
for _ in range(10): | ||
exp_dir = make_experiment_dir(**kw) | ||
dirs.add(exp_dir) | ||
assert exp_dir.exists() | ||
assert len(dirs) == 10 |
0b85da6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
0b85da6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
0b85da6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
0b85da6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report