scikit-build-core icon indicating copy to clipboard operation
scikit-build-core copied to clipboard

Tests fail: ModuleNotFoundError: No module named 'dynamic._module'

Open yurivict opened this issue 6 months ago • 2 comments

==================================================================================== test session starts ====================================================================================
platform freebsd14 -- Python 3.9.18, pytest-7.4.3, pluggy-1.3.0 -- /usr/local/bin/python3.9
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/usr/ports/devel/py-scikit-build-core/work-py39/scikit_build_core-0.7.1/.hypothesis/examples'))
Using --randomly-seed=2146261390
installed packages of interest: build==0.10.0 cattrs==23.2.3 exceptiongroup==1.2.0 furo==2023.9.10 hatch-fancy-pypi-readme==22.8.0 importlib-metadata==7.0.0 importlib-resources==6.1.1 myst-parser==2.0.0 numpy==1.25.0 packaging==23.2 pathspec==0.12.1 pip==23.3.1 pybind11==2.11.1 pyproject-metadata==0.7.1 pytest==7.4.3 pytest-cov==4.1.0 pytest-subprocess==1.5.0 rich==13.7.0 scikit_build_core==0.7.1 setuptools==63.1.0 setuptools-scm==6.4.2 sphinx==5.3.0 sphinx-autodoc-typehints==1.23.0 sphinx-copybutton==0.5.2 sphinx-inline-tabs==2023.4.21 tomli==2.0.1 typing-extensions==4.8.0 virtualenv==20.25.0 wheel==0.42.0
sysconfig platform: freebsd-14.0-STABLE-amd64
rootdir: /usr/ports/devel/py-scikit-build-core/work-py39/scikit_build_core-0.7.1
configfile: pyproject.toml
testpaths: tests
plugins: anyio-4.1.0, hypothesis-6.92.0, asyncio-0.22.0, trio-0.8.0, cov-4.1.0, rerunfailures-11.1.2, randomly-3.12.0, timeout-2.1.0, time-machine-2.11.0, forked-1.6.0, flaky-3.7.0, aspectlib-2.0.0, xdist-3.5.0, env-0.6.2, mock-3.10.0, tornado-0.8.1, pytest_httpserver-1.0.8, isort-3.1.0, flake8-1.1.1, subprocess-1.5.0
asyncio: mode=strict
collected 269 items                                                                                                                                                                         
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/python.py", line 617, in _importtestmodule
INTERNALERROR>     mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/pathlib.py", line 567, in import_path
INTERNALERROR>     importlib.import_module(module_name)
INTERNALERROR>   File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
INTERNALERROR>     return _bootstrap._gcd_import(name[level:], package, level)
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
INTERNALERROR>   File "<frozen importlib._bootstrap_external>", line 850, in exec_module
INTERNALERROR>   File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
INTERNALERROR>   File "/usr/ports/devel/py-scikit-build-core/work-py39/scikit_build_core-0.7.1/tests/packages/dynamic_metadata/src/dynamic/__init__.py", line 1, in <module>
INTERNALERROR>     from ._module import square
INTERNALERROR> ModuleNotFoundError: No module named 'dynamic._module'
INTERNALERROR> 
INTERNALERROR> The above exception was the direct cause of the following exception:
INTERNALERROR> 
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 271, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 324, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py", line 493, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 115, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 152, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_result.py", line 114, in get_result
INTERNALERROR>     raise exc.with_traceback(exc.__traceback__)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 77, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 335, in pytest_collection
INTERNALERROR>     session.perform_collect()
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 675, in perform_collect
INTERNALERROR>     self.items.extend(self.genitems(node))
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/main.py", line 842, in genitems
INTERNALERROR>     rep = collect_one_node(node)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/runner.py", line 546, in collect_one_node
INTERNALERROR>     ihook.pytest_collectstart(collector=collector)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_hooks.py", line 493, in __call__
INTERNALERROR>     return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_manager.py", line 115, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 113, in _multicall
INTERNALERROR>     raise exception.with_traceback(exception.__traceback__)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pluggy/_callers.py", line 77, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/pytest_asyncio/plugin.py", line 552, in pytest_collectstart
INTERNALERROR>     marks = get_unpacked_marks(collector.obj, consider_mro=True)
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/python.py", line 310, in obj
INTERNALERROR>     self._obj = obj = self._getobj()
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/python.py", line 528, in _getobj
INTERNALERROR>     return self._importtestmodule()
INTERNALERROR>   File "/usr/local/lib/python3.9/site-packages/_pytest/python.py", line 642, in _importtestmodule
INTERNALERROR>     raise self.CollectError(
INTERNALERROR> _pytest.nodes.Collector.CollectError: ImportError while importing test module '/usr/ports/devel/py-scikit-build-core/work-py39/scikit_build_core-0.7.1/tests/packages/dynamic_metadata/src/dynamic/__init__.py'.
INTERNALERROR> Hint: make sure your test modules/packages have valid Python names.
INTERNALERROR> Traceback:
INTERNALERROR> /usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
INTERNALERROR>     return _bootstrap._gcd_import(name[level:], package, level)
INTERNALERROR> tests/packages/dynamic_metadata/src/dynamic/__init__.py:1: in <module>
INTERNALERROR>     from ._module import square
INTERNALERROR> E   ModuleNotFoundError: No module named 'dynamic._module'

=================================================================================== no tests ran in 0.96s ===================================================================================
*** Error code 3

Version: 0.7.1 Python-3.9 FreeBSD 14.0

yurivict avatar Jan 02 '24 05:01 yurivict