Skip to content

Commit

Permalink
pathing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
astronomerritt committed Mar 26, 2024
1 parent d337201 commit 07eb820
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/adler/utilities/tests_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@


def get_test_data_path():
# This file's path: `<base_directory>/src/sorcha/utilities/test_data_utilities.py`
# THIS_DIR = `<base_directory>/`
THIS_DIR = Path(__file__).parent.parent.parent.parent
# where is this file?
path_to_file = os.path.abspath(__file__)

# Returned path: `<base_directory>/tests/data/filename`
return os.path.join(THIS_DIR, "tests/data")
# the test data folder is thus:
path_to_data = os.path.join(str(Path(path_to_file).parents[3]), "tests/data/")

return path_to_data


def get_test_data_filepath(filename):
Expand Down

0 comments on commit 07eb820

Please sign in to comment.