From 1d7e2cfb2267fb9467639ad522861138291c4854 Mon Sep 17 00:00:00 2001 From: acbaez9 <97056049+acbaez9@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:22:55 -0700 Subject: [PATCH] fixed test for upload_directory function --- distributaur/tests/test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/distributaur/tests/test.py b/distributaur/tests/test.py index e268107..bb95804 100644 --- a/distributaur/tests/test.py +++ b/distributaur/tests/test.py @@ -172,7 +172,7 @@ def test_upload_directory(): repo_path = distributaur.get_env("HF_REPO_PATH", "data") # Upload the directory to the repository - distributaur.upload_directory(temp_dir, repo_path) + distributaur.upload_directory(temp_dir) # Check if the files exist in the Hugging Face repository api = HfApi(token=hf_token) @@ -180,7 +180,8 @@ def test_upload_directory(): repo_id=repo_id, repo_type="dataset", token=hf_token ) for file in test_files: - assert os.path.join(repo_path, file) in repo_files + print(file) + assert file in repo_files for file in test_files: os.remove(os.path.join(temp_dir, file))