Skip to content

Commit

Permalink
use json directly in paths
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Dec 10, 2024
1 parent 14da7f0 commit d88706b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/setup_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import tempfile
from pathlib import Path
from shutil import copy

from neuroconv.utils import load_dict_from_file
import json

# Output by default to a temporary directory
OUTPUT_PATH = Path(tempfile.mkdtemp())
Expand All @@ -28,7 +27,10 @@
test_config_path.parent.mkdir(parents=True, exist_ok=True)
copy(src=base_test_config_path, dst=test_config_path)

test_config_dict = load_dict_from_file(test_config_path)
with open(file=test_config_path) as f:
# Load the configuration for the data tests
test_config_dict = json.load(f)

LOCAL_PATH = Path(test_config_dict["LOCAL_PATH"])

if test_config_dict["SAVE_OUTPUTS"]:
Expand Down

0 comments on commit d88706b

Please sign in to comment.