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

Test failure with pathspec >= 0.10.0 #14

Open
cottsay opened this issue Nov 17, 2022 · 3 comments
Open

Test failure with pathspec >= 0.10.0 #14

cottsay opened this issue Nov 17, 2022 · 3 comments

Comments

@cottsay
Copy link
Contributor

cottsay commented Nov 17, 2022

The test_ignore_hidden_files test is broken when used with pathspec >= 0.10.0.

I'm not sure if this was a regression in that package or a bugfix.

self = <test_dirhash.TestGetIncludedPaths object at 0x7fad218e2c10>

    def test_ignore_hidden_files(self):
        self.mkdirs('root/d1')
        self.mkdirs('root/.d2')
    
        self.mkfile('root/f1')
        self.mkfile('root/.f2')
        self.mkfile('root/d1/f1')
        self.mkfile('root/d1/.f2')
        self.mkfile('root/.d2/f1')
    
        # no ignore
        filepaths = included_paths(self.path_to('root'))
        assert filepaths == ['.d2/f1', '.f2', 'd1/.f2', 'd1/f1', 'f1']
    
        # with ignore
        filepaths = included_paths(
            self.path_to('root'),
            match=['*', '!.*']
        )
>       assert filepaths == ['.d2/f1', 'd1/f1', 'f1']
E       AssertionError: assert ['d1/f1', 'f1'] == ['.d2/f1', 'd1/f1', 'f1']
E         At index 0 diff: 'd1/f1' != '.d2/f1'
E         Right contains one more item: 'f1'
E         Use -v to get more diff
@andhus
Copy link
Owner

andhus commented Jan 15, 2024

Thanks! Sorry for the huge delay -> #9
Seems related to cpburnz/python-pathspec#57 (?)
Now also exposed here: #17 (WIP)

@andhus
Copy link
Owner

andhus commented Apr 8, 2024

See also: cpburnz/python-pathspec#62 (comment)

@frichtarik
Copy link
Contributor

proposed fix #25

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

3 participants