I needed to do something like <https://stackoverfl...
# general
h
I needed to do something like https://stackoverflow.com/questions/50174130/how-do-i-pytest-a-project-using-pep-420-namespace-packages/50175552#50175552 in my
conftest.py
. Pants doesn't know that
_pytest
comes from the
pytest
package. Where's the most appropriate place to inform that? I could get by with a
# pants: no-infer-dep
, but curious about a more proper fix.
https://github.com/pantsbuild/pants/pull/14604
The pull request first appeared in release_2.11.0.dev2
h
The requirement comes from pants internally, though. I tried adding it to the only
python_requirements
I have, but it doesn't pick that up.
b
oh right, that issue 🙄
You probably wanna add
pytest
to your
requirements.txt
Which has its own issues.
Altenratively, if you aren't using pylint/mypy on the file you can
# pants: no-infer-dep
that line
h
yeah, I'll probably just do that for now to keep requirements.txt "clean". Thanks for confirming
oof, actually, it's happening on every usage of
pytest
too. To the requirements we go