Skip to content

Commit

Permalink
🩹 Fix 'setup_case_study' when used with 'results_folder_root' (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-weigand authored Oct 24, 2021
1 parent 90daa5b commit fe6e00f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyglotaran_extras/io/setup_case_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def setup_case_study(
if results_folder_root is None:
results_folder_root = Path.home() / output_folder_name
else:
results_folder_root = Path(str(results_folder_root))
results_folder_root = Path(str(results_folder_root)) / output_folder_name
script_folder_rel = analysis_folder.relative_to(analysis_folder.parent)
results_folder = (results_folder_root / script_folder_rel).resolve()
results_folder.mkdir(parents=True, exist_ok=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/io/test_setup_case_study.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_setup_case_study_custom(tmp_path: Path):
results_folder_root = tmp_path / "foo"

results_folder, script_folder = setup_case_study(
output_folder_name="foo", results_folder_root=results_folder_root
output_folder_name="foo", results_folder_root=tmp_path
)

assert results_folder_root.exists()
Expand Down

0 comments on commit fe6e00f

Please sign in to comment.