bumpy-noon-80834
10/07/2022, 8:49 PMpytest.mark.parametrize
).
./pants lint ::
fails because pytest is not available in the pylint environment.
I fixed it by adding a python_requirement()
for pytest. But this feels weird, as pytest is the standard test runner used by Pants and because now I could end up using a different version of pytest as a library vs. as a test runner. And I have to repeat that standard requirement almost everywhere.
Any better way to handle this?clean-city-64472
10/07/2022, 8:55 PMbumpy-noon-80834
10/07/2022, 8:56 PMbumpy-noon-80834
10/07/2022, 8:57 PMclean-city-64472
10/07/2022, 8:59 PMclean-city-64472
10/07/2022, 9:01 PMhigh-yak-85899
10/07/2022, 9:08 PMpytest
in our requirements.txt
(and I think it's more typical to put that in something like requirements-dev.txt
) nor do we have a bunch of python_requirement
targets and using pytest in a test works fine.high-yak-85899
10/07/2022, 9:09 PMhigh-yak-85899
10/07/2022, 9:09 PM./pants lint
high-yak-85899
10/07/2022, 9:09 PM./pants test
high-yak-85899
10/07/2022, 9:09 PMbumpy-noon-80834
10/07/2022, 9:26 PMhigh-yak-85899
10/07/2022, 9:47 PMbitter-ability-32190
10/07/2022, 10:06 PMbitter-ability-32190
10/07/2022, 10:06 PM