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

option mpl-use-full-test-name breaks hash library path #115

Closed
theRealSuperMario opened this issue Mar 7, 2021 · 1 comment
Closed

option mpl-use-full-test-name breaks hash library path #115

theRealSuperMario opened this issue Mar 7, 2021 · 1 comment

Comments

@theRealSuperMario
Copy link

See #114

It looks like the paths are not correctly adapted if mpl-use-full-test-name is enabled

See tests in PR

image

Test output is

Can't find hash library ..

As far as I understand, the error can be narrowed down to

hash_library_filename = (Path(item.fspath).parent / hash_library_filename).absolute()

I will push a fix in #114 later.

@ConorMacBride
Copy link
Member

From looking at #114, I think the fix was changing

        hash_library_filename = (Path(item.fspath).parent / hash_library_filename).absolute()

to

        if self.config.getini("mpl-use-full-test-name"):
            hash_library_filename = hash_library_filename.absolute()
        else:
            hash_library_filename = (Path(item.fspath).parent / hash_library_filename).absolute()

As currently documented, mpl-use-full-test-name should not affect the directory from where the hash library file is relative to. There is an issue with the hash library path, but I don't think it is related to the mpl-use-full-test-name option.

There is a separate issue (noted in #198) saying that --mpl-hash-library should be relative to where pytest was run (to match --mpl-baseline-path), which I think should solve this issue with the broken hash library path.

@ConorMacBride ConorMacBride closed this as not planned Won't fix, can't repro, duplicate, stale May 20, 2023
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

2 participants