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

resolve paths before comparing #9939

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dotlambda
Copy link

Pull Request Check List

Resolves: test_python_get_preferred_default fails because one of the paths being compared is a symlink to the other:

______________________ test_python_get_preferred_default _______________________
[gw3] linux -- Python 3.12.8 /nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3.12

config = <tests.conftest.Config object at 0x7fffee6f9760>

    def test_python_get_preferred_default(config: Config) -> None:
        python = Python.get_preferred_python(config)
    
>       assert python.executable == Path(sys.executable)
E       AssertionError: assert PosixPath('/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python') == PosixPath('/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3.12')
E        +  where PosixPath('/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python') = <poetry.utils.env.python_manager.Python object at 0x7fffef07acf0>.executable
E        +  and   PosixPath('/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3.12') = Path('/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3.12')
E        +    where '/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/bin/python3.12' = sys.executable
  • Added tests for changed code.
  • Updated documentation for changed code.

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

Successfully merging this pull request may close these issues.

1 participant