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

issues with test_paths #139

Open
mathause opened this issue Jan 6, 2025 · 0 comments
Open

issues with test_paths #139

mathause opened this issue Jan 6, 2025 · 0 comments

Comments

@mathause
Copy link
Collaborator

mathause commented Jan 6, 2025

test_paths - i.e. passing a list of strings (instead of querying the filesystem) can fail:

  1. Non-unique paths can be passed.

    from filefisher import FileFinder
    
    ff = FileFinder(
        path_pattern="{cat}",
        file_pattern="{file}",
        test_paths=["a/file1", "a/file1"]
    )
    
    ff.find_files() # fails (correctly)
  2. find_paths can fail with seemingly duplicated paths:

    from filefisher import FileFinder
    
    ff = FileFinder(
        path_pattern="{cat}",
        file_pattern="{file}",
        test_paths=["a/file1", "a/file2"]
    )
    
    ff.find_files() # works
    ff.find_paths() # fails (but should not)

not a blocker because it does not affect the "real" functionality.

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

No branches or pull requests

1 participant