Skip to content

Commit

Permalink
fix string/path issue in generate and qc
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultdvx committed Jun 3, 2024
1 parent 7a59036 commit 4efbcac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/test_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def test_generate(cmdopt, tmp_path, test_name):
"t1-linear",
]
elif test_name == "hypometabolic_example":
output_folder = str(tmp_out_dir / test_name)
output_folder = tmp_out_dir / test_name
test_input = [
"generate",
"hypometabolic",
data_caps_pet,
output_folder,
str(output_folder),
"--n_subjects",
"2",
"--pathology",
Expand Down
14 changes: 7 additions & 7 deletions tests/test_qc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,29 @@ def test_qc(cmdopt, tmp_path, test_name):
tmp_out_dir.mkdir(parents=True)

if test_name == "t1-linear":
out_tsv = str(tmp_out_dir / "QC.tsv")
out_tsv = tmp_out_dir / "QC.tsv"
test_input = [
"t1-linear",
str(input_dir / "caps"),
out_tsv,
str(out_tsv),
"--no-gpu",
]

elif test_name == "t1-volume":
out_dir = str(tmp_out_dir / "QC_T1V")
out_dir = tmp_out_dir / "QC_T1V"
test_input = [
"t1-volume",
str(input_dir / "caps_T1V"),
out_dir,
str(out_dir),
"Ixi549Space",
]

elif test_name == "pet-linear":
out_tsv = str(tmp_out_dir / "QC_pet.tsv")
out_tsv = tmp_out_dir / "QC_pet.tsv"
test_input = [
"pet-linear",
str(input_dir / "caps_pet"),
out_tsv,
str(out_tsv),
"18FFDG",
"cerebellumPons2",
"--threshold",
Expand Down Expand Up @@ -73,7 +73,7 @@ def test_qc(cmdopt, tmp_path, test_name):
assert out_df.equals(ref_df)

elif test_name == "t1-volume":
assert compare_folders(out_dir, str(ref_dir / "QC_T1V"), tmp_out_dir)
assert compare_folders(out_dir, ref_dir / "QC_T1V", tmp_out_dir)

elif test_name == "pet-linear":
out_df = pd.read_csv(out_tsv, sep="\t")
Expand Down

0 comments on commit 4efbcac

Please sign in to comment.