dev-python/scipy has logic to skip the tests in datasets/tests/test_data.py when dev-python/pooch is not installed, i.e. wd40 profiles. However it seems that despite passing the correct command line, pytest still attempts to collect these tests anyway. The assembled command line is: python3.10 -m pytest -vv -ra -l -Wdefault --color=yes -o console_output_style=count -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown -p no:sugar -p no:xvfb -p no:tavern --deselect linalg/tests/test_decomp.py::TestSchur::test_sort --deselect linalg/tests/test_solvers.py::test_solve_discrete_are --deselect optimize/tests/test_milp.py::test_milp_timeout_16545 --deselect datasets/tests/test_data.py::TestDatasets::test_existence_all --deselect datasets/tests/test_data.py::TestDatasets::test_ascent --deselect datasets/tests/test_data.py::TestDatasets::test_face --deselect datasets/tests/test_data.py::TestDatasets::test_electrocardiogram --ignore datasets/tests/test_data.py -n 16 --pyargs scipy However it still errors: ImportError while importing test module '/var/tmp/portage/dev-python/scipy-1.10.1/work/scipy-1.10.1-python3_10/install/usr/lib/python3.10/site-packages/scipy/datasets/tests/test_data.py'. Hint: make sure your test modules/packages have valid Python names. Traceback: ../work/scipy-1.10.1-python3_10/install/usr/lib/python3.10/site-packages/scipy/datasets/tests/test_data.py:10: in <module> import pooch E ModuleNotFoundError: No module named 'pooch' During handling of the above exception, another exception occurred: /usr/lib/python3.10/site-packages/_pytest/python.py:617: in _importtestmodule mod = import_path(self.path, mode=importmode, root=self.config.rootpath) /usr/lib/python3.10/site-packages/_pytest/pathlib.py:564: in import_path importlib.import_module(module_name) /usr/lib/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) <frozen importlib._bootstrap>:1050: in _gcd_import ??? <frozen importlib._bootstrap>:1027: in _find_and_load ??? <frozen importlib._bootstrap>:1006: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:688: in _load_unlocked ??? /usr/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:172: in exec_module exec(co, module.__dict__) ../work/scipy-1.10.1-python3_10/install/usr/lib/python3.10/site-packages/scipy/datasets/tests/test_data.py:12: in <module> raise ImportError("Missing optional dependency 'pooch' required " E ImportError: Missing optional dependency 'pooch' required for scipy.datasets module. Please use pip or conda to install 'pooch'. Reproducible: Always
Created attachment 860713 [details] build.log.gz
It seems to be caused by --pyargs. I'm testing a fix.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=790bb170cc4b04eaae1bb8d3f26b33a59ea16232 commit 790bb170cc4b04eaae1bb8d3f26b33a59ea16232 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2023-04-25 15:31:32 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2023-04-25 16:05:35 +0000 dev-python/scipy: Fix ignoring tests with !pooch Closes: https://bugs.gentoo.org/904975 Signed-off-by: Michał Górny <mgorny@gentoo.org> dev-python/scipy/scipy-1.10.1.ebuild | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)