Is it possible to pass pytest cli args that only a...
# general
g
Is it possible to pass pytest cli args that only apply specific to a module/python_test target?
h
You'd have to run that target separately
But it is an interesting use case for "grand unification" of options and target metadata
g
yeah, in my specific use case I need to ignore certain tests files -- which I suppose I could do another way, no?
w
filter
?
g
is filter allowed when using --since?
c
like, not running the tests for a certain
_test.py
file? why not use https://www.pantsbuild.org/2.20/reference/targets/python_test#skip_tests
Copy code
python_tests(.., overrides={("foo_test.py", "bar_test.py"): dict(skip_tests=True)})
If it is for one offs... you could add a env toggle to it..?
Copy code
..., skip_tests=env("SKIP_FOO_TESTS", "no") != "no",
then:
Copy code
$ SKIP_FOO_TESTS=yep pants test ...
g
Thanks @curved-television-6568 for giving me even more options.
😅 1