-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
set_env substitution doesn't pass PYTHONHASHSEED in tox 4.x #2872
Comments
Looks like this is happening because of the order in which
This is because of the way Line 96 in b7fec1e
So in the second example, where it is set to
Lines 85 to 101 in b7fec1e
Reversing the tox/src/tox/tox_env/python/api.py Lines 103 to 108 in b7fec1e
|
setenv defined explicitly until regression fixed in tox: * tox-dev/tox#2972 * tox-dev/tox#2872
setenv defined explicitly until regression fixed in tox: * tox-dev/tox#2972 * tox-dev/tox#2872
setenv defined explicitly until regression fixed in tox: * tox-dev/tox#2972 * tox-dev/tox#2872
Any updates on this issue? |
Yes, pull requests to fix this are welcome. We don't plan to work on this otherwise. |
Issue
Hi, I have encountered what I believe is tox bug.
With 2 test environments: base (
[testenv]
) and non-base ([testenv:hs]
), some environment variables from the base one aren't set in the non-base when they are passed as a substitution, like:In above example
PYTHONHASHSEED
will be random for every run oftox -e has
andOTHER
will be correctly set to foo. I found out that tox displays the same behaviour for some other variables, likePATH
, but I didn't dig any further.Funny thing is that if we mix
setenv
andset_env
a little bit, tox suddenly starts passingPYTHONHASHSEED
, for example below tox.ini setsPYTHONHASHSEED
to 0.I checked this on tox 4.3.1, 4.3, 4.2, 4.1 and 4.0. Tox 3.x doesn't have this behaviour.
Full tox.ini files attached below.
Environment
Output of running tox
Provide the output of
tox -rvv
:Minimal example
tox.ini which doesn't pass
PYTHONHASHSEED
tohs
environment, but passesOTHER
:tox.ini which passes
PYTHONHASHSEED
tohs
environment (watch the underscores in set_env and setenv)The text was updated successfully, but these errors were encountered: