worried-painter-31382
07/24/2022, 8:38 AMsetup.cfg
[tool:pytest]
...
addopts =
-p amra.pytest.plugin.suites
When I run ./pants test
, the amra.pytest.plugin.suites
module is not found, because it is not imported in the tests.worried-painter-31382
07/24/2022, 8:39 AMTraceback (most recent call last):
File "~/.cache/pants/named_caches/pex_root/venvs/s/46cd174a/venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 743, in import_plugin
__import__(importspec)
ModuleNotFoundError: No module named 'amra.pytest.plugin.suites'
for each test runworried-painter-31382
07/24/2022, 8:40 AMworried-painter-31382
07/24/2022, 8:41 AM[pytest].extra_requirements
point to an in-repo address? 🤔
No, that goes via pip regardless of entry syntaxworried-painter-31382
07/24/2022, 8:54 AM[tailor].alias_mapping
using a macro to include the plugin dependency might be what I'm looking for.bitter-ability-32190
07/24/2022, 9:30 AMconftest.py
which declares pytest_plugins
to be all the plugins we want.
What you're seeing is pants has no way to infer the dependency. It can infer dependencies on conftest files, and I turn on "string import" dependency inference, so when it goes to infer deps of the conftest it sees the module name strings and adds deps for each modulebitter-ability-32190
07/24/2022, 9:39 AM