miniature-apartment-8295
06/08/2023, 1:42 PMlocal_environment
in my top leven BUILD file:
local_environment(
name="local-environment",
subprocess_environment_env_vars=env_vars_devcontainer(),
)
where the environment variables are defined in my macros.py. Furthermode I added this environment to my pants.toml:
[environments-preview.names]
local = "//:local-environment"
As far as I understand this environment is automatically used when I run pants test
. However, there is one environment variable which needs (for some reason) a different value when used in tests, lets say when using it locally it outside of tests it should be ENV_VAR=true
and when tests are run it should be ENV_VAR=false
. I can achieve this using ENV_VAR=false pants test
, however, I don't like this solution and would like to (somehow) set it in the config. Is there a possibility to do that? I tried setting
[test]
extra_env_vars = ["ENV_VAR=false"]
in the pants.toml but that is somehow ignored by pants.