Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit test for utils.py #668

Merged
merged 4 commits into from Mar 23, 2021

Conversation

hakanbakacak
Copy link
Contributor

related #149

@mynameisvinn
Copy link
Contributor

@hakanbakacak for some reason it is failing a test.

dst_url = 'snark-test/cp_copy_dataset_gcs_1a', token = None, fs = None
public = True
src_url = '/home/circleci/project/data/testing/cp_original_ds_local_3'
src_fs = <fsspec.implementations.local.LocalFileSystem object at 0x7f1808c97220>

    def _copy_helper(
        dst_url: str, token=None, fs=None, public=True, src_url=None, src_fs=None
    ):
        """Helper function for Dataset.copy"""
        src_url = src_fs.expand_path(src_url)[0]
        dst_url = dst_url[:-1] if dst_url.endswith("/") else dst_url
        dst_fs, dst_url = (
            (fs, dst_url) if fs else get_fs_and_path(dst_url, token=token, public=public)
        )
        if dst_fs.exists(dst_url) and dst_fs.ls(dst_url):
>           raise DirectoryNotEmptyException(dst_url)
E           hub.exceptions.DirectoryNotEmptyException: The destination url snark-test/cp_copy_dataset_gcs_1a for copying dataset is not empty. Delete the directory manually or use Dataset.delete if it's a Hub dataset

hub/api/dataset_utils.py:182: DirectoryNotEmptyException

Screen Shot 2021-03-09 at 6 56 22 AM

@mynameisvinn mynameisvinn self-requested a review March 9, 2021 11:58
@mynameisvinn mynameisvinn added the documentation Improvements or additions to documentation label Mar 9, 2021
@hakanbakacak
Copy link
Contributor Author

I can't find the source of the problem. Do you have any suggestions for solving this problem?

@AbhinavTuli
Copy link
Contributor

@hakanbakacak could you try merging master into your branch? I believe it should fix the issue 😄

@mynameisvinn mynameisvinn merged commit e3f1c84 into activeloopai:master Mar 23, 2021
@mynameisvinn
Copy link
Contributor

@hakanbakacak This looks good! Thanks for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants