breezy-electrician-41537
05/07/2024, 11:00 AMroot
|--projectA/
|--projectB/
|--pants.toml
In pants.toml
, I have:
[test]
extra_env_vars=["ENV_A", "ENVB"]
So, when I run pants test
these env vars are injected. I want projectA
to have a different set of env vars to projectB
. Is there a way of nesting the extra_env_vars
section inside of projectA
and projectB
so that they apply to all tests in the respective projects?
Note: I'm looking for a way so that the env vars for a project are applied to all the tests for that project in one go.bitter-ability-32190
05/07/2024, 6:43 PMconftest.py
files thoughbreezy-electrician-41537
05/07/2024, 7:16 PMbitter-ability-32190
05/07/2024, 7:27 PMbitter-ability-32190
05/07/2024, 7:27 PMbitter-ability-32190
05/07/2024, 7:28 PM__defaults__
? https://www.pantsbuild.org/2.19/reference/targets/python_test#extra_env_varsbitter-ability-32190
05/07/2024, 7:28 PMbreezy-electrician-41537
05/07/2024, 10:29 PMpython_tests.__defaults__.extra_env_vars
in the root Buid
file, and hopefully that sets it on all the pything_tests? but then if two projects are built, is there a chance the values clash?bitter-ability-32190
05/07/2024, 10:49 PMbreezy-electrician-41537
05/07/2024, 10:53 PM