Fix tests for build environment relying on PYTHONPATH#318
Fix tests for build environment relying on PYTHONPATH#318bbc2 merged 1 commit intotheskumar:masterfrom
PYTHONPATH#318Conversation
hroncok
left a comment
There was a problem hiding this comment.
I think some of the environment variables got accidentally lost.
d9fae2a to
13303ca
Compare
|
Thanks for the suggestion, fixed. |
There was a problem hiding this comment.
Very nice, I was about to push the same thing for Gentoo 👍
The missing variable is PYTHONPATH: Without it setuptools easy-install-entry-script will happily use (say) dotenv 0.16.0 installed in the system rather than 0.17.0 in those two tests. So my vote for merging this before the next release. Thank you! 🙏
Related:
|
PS: @befeleme could you adjust the title of the pull request to make clear that this is a bugfix for the tests? Thank you! |
Overriding the whole environment would remove critical variables like `PYTHONPATH`. This would break tests on some systems like during Fedora or Gentoo packaging.
PYTHONPATH
|
Thank you for the fix! I just fixed some formatting and updated the changelog. I'll release this in a few minutes. |
|
Released as v0.17.1. |
|
Very nice, thank you! 👍 👍 |
Hey,
I want to update dotenv to 0.17.0 in Fedora, but realized the two newly introduced tests started failing in the build process.
This happens because defining
_envreplaces the existing environment, effectively unsetting many variables (which, in my case, means losing information where to look for the module to import). Instead of creating completely new contents, I propose copying existing environment and adding the tested key-value on the top of it.This will not affect the existing test suite but can help other packagers.