Q10: Passing extra pytest args to skip "integratio...
# general
r
Q10: Passing extra pytest args to skip "integration" marked tests, but running the test says "ERROR: file or directory not found: integration"
1
b
I think you need to provide quotes:
"'not integration'"
r
hm ok
image.png
f
also possible that there is a missing
shlex.quote
somewhere in the code
if you run with
-ldebug
, Pants will log the
Process
instance it wants to run
that will quickly demonstrate if there is an issue or not
r
does pants reset the environment variables passed to individual pytest processes?
yeah. it does.....
f
yes
the env is set from several sources
r
the param name is "extra_envs" so i'd expected it is merged upon
os.environ
r
depending on the setup, i need to locally override some environment variables (e.g., on dev setup)
which should not be set in CI and production
i don't want put these env-vars in the version control
f
you can always add an extra config file to your local invocations
with just the extra env vars you need
then point Pants at the extra config file by setting
PANTS_CONFIG_FILES
in the environment so you don’t need to specify on each invocation
r
ahha, pants has its own env-var overriding env-var
good
f
every Pants option can also be set in the environment
so you could set
PANTS_TEST_EXTRA_ENV_VARS
c
For dev machines there's also the .pants.rc style files you can use (would post link to docs, but are on my phone currently, and the docs is kind of a pain on mobile..)