You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to make NixOS run the tests of this package during build. Here's a log of the errors we see here, when we run python -m pytest:
============================= test session starts ==============================
platform linux -- Python 3.10.12, pytest-7.4.0, pluggy-1.2.0
rootdir: /build/source
collected 4 items / 4 errors
==================================== ERRORS ====================================
___________________ ERROR collecting tests/test_p3helpers.py ___________________
ImportError while importing test module '/build/source/tests/test_p3helpers.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/lx8vhp4fxclp494svlfis3sb2g8z4l9h-python3-3.10.12/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_p3helpers.py:27: in <module>
from primer3 import p3helpers # type: ignore
E ImportError: cannot import name 'p3helpers' from 'primer3' (/build/source/primer3/__init__.py)
_________________ ERROR collecting tests/test_primerdesign.py __________________
ImportError while importing test module '/build/source/tests/test_primerdesign.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/lx8vhp4fxclp494svlfis3sb2g8z4l9h-python3-3.10.12/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_primerdesign.py:44: in <module>
from primer3 import (
primer3/bindings.py:43: in <module>
from primer3 import ( # type: ignore
E ImportError: cannot import name 'thermoanalysis' from 'primer3' (/build/source/primer3/__init__.py)
________________ ERROR collecting tests/test_thermoanalysis.py _________________
ImportError while importing test module '/build/source/tests/test_thermoanalysis.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/lx8vhp4fxclp494svlfis3sb2g8z4l9h-python3-3.10.12/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_thermoanalysis.py:37: in <module>
from primer3 import bindings
primer3/bindings.py:43: in <module>
from primer3 import ( # type: ignore
E ImportError: cannot import name 'thermoanalysis' from 'primer3' (/build/source/primer3/__init__.py)
__________________ ERROR collecting tests/test_threadsafe.py ___________________
ImportError while importing test module '/build/source/tests/test_threadsafe.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/nix/store/lx8vhp4fxclp494svlfis3sb2g8z4l9h-python3-3.10.12/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_threadsafe.py:37: in <module>
from primer3 import thermoanalysis # type: ignore
E ImportError: cannot import name 'thermoanalysis' from 'primer3' (/build/source/primer3/__init__.py)
=========================== short test summary info ============================
ERROR tests/test_p3helpers.py
ERROR tests/test_primerdesign.py
ERROR tests/test_thermoanalysis.py
ERROR tests/test_threadsafe.py
!!!!!!!!!!!!!!!!!!! Interrupted: 4 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 4 errors in 0.18s ===============================
The text was updated successfully, but these errors were encountered:
It looks like the Cython modules are not built. How did you build or install primer3-py prior to invoking python -m pytest. It looks like you are running the tests from within the package directory, in which case you need to do an "in place" build: python setup.py build_ext --inplace
Hey and thanks for trying to help :). Indeed we run python -m pytest in the package's directory, after it was installed at a certain location. In fact, here at NixOS we investigate similar issues we experience with other packages that use Cython extension modules, over at NixOS/nixpkgs#255262 .
If I run python setup.py build_ext --inplace before I run python -m pytest indeed that helps and all the tests pass. Perhaps this issue can be closed, as we probably need to further investigate the issue on NixOS by ourselves.
Hello,
I'd like to make NixOS run the tests of this package during build. Here's a log of the errors we see here, when we run
python -m pytest
:The text was updated successfully, but these errors were encountered: