Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail to find test_utils #251

Open
yurivict opened this issue Feb 9, 2025 · 1 comment
Open

Tests fail to find test_utils #251

yurivict opened this issue Feb 9, 2025 · 1 comment

Comments

@yurivict
Copy link

yurivict commented Feb 9, 2025

===>   py311-zfp-1.0.1 depends on file: /usr/local/bin/python3.11 - found
cd /usr/ports/devel/py-zfp/work-py311/zfp-1.0.1/python/../tests/python && /usr/bin/env -i HOME=/usr/ports/devel/py-zfp/work-py311  MACHINE_ARCH=amd64  PWD="${PWD}"  GIT_CEILING_DIRECTORIES=/usr/ports/devel/py-zfp/work-py311  __MAKE_CONF=/nonexistent OSVERSION=1402501 PATH=/usr/local/libexec/ccache:/usr/ports/devel/py-zfp/work-py311/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin TERM=xterm-256color NINJA_STATUS="[%p %s/%t] " XDG_DATA_HOME=/usr/ports/devel/py-zfp/work-py311  XDG_CONFIG_HOME=/usr/ports/devel/py-zfp/work-py311  XDG_CACHE_HOME=/usr/ports/devel/py-zfp/work-py311/.cache  HOME=/usr/ports/devel/py-zfp/work-py311 PATH=/usr/local/libexec/ccache:/usr/ports/devel/py-zfp/work-py311/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin PKG_CONFIG_LIBDIR=/usr/ports/devel/py-zfp/work-py311/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES DESTDIR=/usr/ports/devel/py-zfp/work-py311/stage PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing "  CPP="cpp" CPPFLAGS="-isystem /usr/local/include"  LDFLAGS=" -fstack-protector-strong -L/usr/local/lib " LIBS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include " CCACHE_DIR="/tmp/.ccache" BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444" PYTHONPATH=/usr/ports/devel/py-zfp/work-py311/stage/usr/local/lib/python3.11/site-packages:/usr/ports/devel/py-zfp/work-py311/zfp-1.0.1/python/../tests/python /usr/local/bin/python3.11 -m pytest -k '' -rs -v -o addopts= -v
/usr/local/lib/python3.11/site-packages/pytest_benchmark/logger.py:39: PytestBenchmarkWarning: Benchmarks are automatically disabled because xdist plugin is active.Benchmarks cannot be performed reliably in a parallelized environment.
  warner(PytestBenchmarkWarning(text))
============================================================================================================================= test session starts =============================================================================================================================
platform freebsd14 -- Python 3.11.11, pytest-8.1.1, pluggy-1.5.0 -- /usr/local/bin/python3.11
codspeed: 3.1.2 (disabled, mode: walltime, timer_resolution: 1.0ns)
cachedir: .pytest_cache
benchmark: 5.1.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=1309787427
PyQt5 5.15.11 -- Qt runtime 5.15.16 -- Qt compiled 5.15.16
rootdir: /usr/ports/devel/py-zfp/work-py311/zfp-1.0.1/tests/python
plugins: aspectlib-2.0.0, flaky-3.8.1, asyncio-0.23.8, benchmark-5.1.0, env-0.6.2, forked-1.6.0, mock-3.10.0, rerunfailures-11.1.2, timeout-2.1.0, xdist-3.6.1, time-machine-2.11.0, cov-5.0.0, randomly-3.12.0, checkdocs-2.13.0, codspeed-3.1.2, flake8-1.1.1, isort-4.0.0, qt-4.4.0, subtests-0.12.1, enabler-3.1.1, anyio-4.8.0, typeguard-4.4.1, subprocess-1.5.2
asyncio: mode=Mode.STRICT
4 workers [0 items]    error                                                                                                                                                                                                                                                  
scheduling tests via LoadScheduling

=================================================================================================================================== ERRORS ====================================================================================================================================
_______________________________________________________________________________________________________________________ ERROR collecting test_numpy.py ________________________________________________________________________________________________________________________
ImportError while importing test module '/usr/ports/devel/py-zfp/work-py311/zfp-1.0.1/tests/python/test_numpy.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.11/site-packages/_pytest/python.py:520: in importtestmodule
    mod = import_path(
/usr/local/lib/python3.11/site-packages/_pytest/pathlib.py:584: in import_path
    importlib.import_module(module_name)
/usr/local/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1204: in _gcd_import
    ???
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
/usr/local/lib/python3.11/site-packages/_pytest/assertion/rewrite.py:178: in exec_module
    exec(co, module.__dict__)
test_numpy.py:6: in <module>
    import test_utils
E   ModuleNotFoundError: No module named 'test_utils'

-------- coverage: platform freebsd14, python 3.11.11-final-0 --------
Name            Stmts   Miss  Cover
-----------------------------------
test_numpy.py     106    103     3%
-----------------------------------
TOTAL             106    103     3%

============================================================================================================================== 1 error in 11.21s ==============================================================================================================================
*** Error code 1

Perhaps the test_utils.py file is missing?

Version: 1.0.1
Python-3.11
FreeBSD 14.2

@yurivict yurivict changed the title Tests fail to find Tests fail to find test_utils Feb 9, 2025
@lindstro
Copy link
Member

@yurivict I think the tests/python/test_utils.pyx Cython file is the answer to your question. Most of our tests require CMake/CTest. Have you tried that? See also #227 in regards to more recent versions of CMake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants