tox-dev / pipdeptree

A command line utility to display dependency tree of the installed Python packages
https://pypi.python.org/pypi/pipdeptree
MIT License
2.73k stars 147 forks source link

Modify tests to ensure $PYTHONPATH is given to the custom interpreter #353

Closed kemzeb closed 2 months ago

kemzeb commented 2 months ago

Should finally resolve #343.

Before 2.17.0, we weren't honoring $PYTHONPATH when it was passed to the custom interpreter (but were honoring it when not using a custom interpreter).

With the changes made in 2.17.0, we (unexpectedly) began to honor $PYTHONPATH when using --python. I believe this is fine since as I explained above we honored it when it was used without this option and because of this it makes sense to pass this env var to the custom interpreter child process instead of ignoring it. Maybe we should document this in the 2.17.0 release notes?

This adds a test and changes another to ensure that there aren't future hiccups when using this env var.