Hi Guys I have a couple of questions: 1. Is it pos...
# development
Hi Guys I have a couple of questions: 1. Is it possible to use pex_binary with environment variables? 2. We have tests that need an environment variable only if they use a specific library (models django orm - they need the DJANGO_SETTINGS_MODULE), is it possible to pass the variable up the stack to a test? 3. it seems that
pants tailor
ignores fixtures/marks in pytest (
if there’s a test that uses
) , would it be possible detect this automatically 4. we have a
that has an
for example
addopts ="-p no:dash"
, pytest fails because it doesn’t recognize this, we needed to add
in the beginning of
, is this intended or a bug?
Hi! 1. Can you explain what you mean? If you build a pex in Pants and then run it outside of Pants, it's just a process that has access to its environment like any other. So I assume you're asking about something else? 2. One way to do that kind of thing is with
. There is an example here: https://github.com/pantsbuild/example-django/blob/main/helloworld/greet/conftest.py 3. You'd like
to add those dependencies automatically? Probably what we actually want is for dependency inference to understand marks, that would be a great feature! Could you open a ticket for it at https://github.com/pantsbuild/pants/issues? 4. Hmm, that might be a bug, can you file it at that same link? Thanks!
1. I see what you mean, I’ll try to get a specific example, but I think I understand you 2. Cool - will try it out. 3. https://github.com/pantsbuild/pants/issues/13290 4. https://github.com/pantsbuild/pants/issues/13291