Skip to content

Commit

Permalink
Finally Fixed Pathing
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMau committed Aug 28, 2023
1 parent e356fd6 commit 73951fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 3 additions & 7 deletions tests/test_build_datapackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
path_default = (
PATH_TEST_FILES
/ "_files"
/ "tabular_datapackage_mininmal_example"
/ "data"
/ "elements"
/ "build_datapackage_goal"
)


Expand Down Expand Up @@ -194,14 +192,12 @@ def mock_get_process(process_name):

mock_adapter.get_process.side_effect = mock_get_process
# Call the method with the mock adapter
path = os.getcwd()
test_path = os.path.join(path, "_files", "build_datapackage_test")
goal_path = os.path.join(path, "_files", "build_datapackage_goal")
test_path = os.path.join(path_default, "..", "build_datapackage_test")
result = DataPackage.build_datapackage(mock_adapter)
result.save_datapackage_to_csv(test_path)

check_if_csv_dirs_equal(
goal_path,
path_default,
test_path,
)

Expand Down
3 changes: 0 additions & 3 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ def check_if_csv_dirs_equal(dir_a, dir_b):
files_a = get_all_file_paths(dir_a)
files_b = get_all_file_paths(dir_b)

print(f"files a are: {files_a}")
print(f"dir a is {dir_a}")
print(f"files b are: {files_b}")
files_a = [file for file in files_a if file.split(".")[-1] == "csv"]
files_b = [file for file in files_b if file.split(".")[-1] == "csv"]
files_a.sort()
Expand Down

0 comments on commit 73951fb

Please sign in to comment.