check() fails because it can't find module 'tests'
Description:
construct was probably build while pytest 7 was around. Because of breaking changes in pytest 8 it can't find the tests anymore. This is known by upstream. See below.
Additional info:
- package version(s): python-construct-2.10.70-2
- config and/or log files:
==> Starting check()...
============================= test session starts ==============================
platform linux -- Python 3.11.8, pytest-8.1.1, pluggy-1.4.0
benchmark: 4.0.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)
rootdir: /build/python-construct/src/construct-2.10.70
plugins: typeguard-4.2.1, benchmark-4.0.0
collected 400 items / 10 errors
==================================== ERRORS ====================================
__________ ERROR collecting tests/deprecated_gallery/test_formats.py ___________
ImportError while importing test module '/build/python-construct/src/construct-2.10.70/tests/deprecated_gallery/test_formats.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/deprecated_gallery/test_formats.py:1: in <module>
from tests.declarativeunittest import *
E ModuleNotFoundError: No module named 'tests'
_________ ERROR collecting tests/deprecated_gallery/test_protocols.py __________
ImportError while importing test module '/build/python-construct/src/construct-2.10.70/tests/deprecated_gallery/test_protocols.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/deprecated_gallery/test_protocols.py:1: in <module>
from tests.declarativeunittest import *
E ModuleNotFoundError: No module named 'tests'
________________ ERROR collecting tests/gallery/test_gallery.py ________________
ImportError while importing test module '/build/python-construct/src/construct-2.10.70/tests/gallery/test_gallery.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/gallery/test_gallery.py:1: in <module>
from tests.declarativeunittest import *
E ModuleNotFoundError: No module named 'tests'
__________________ ERROR collecting tests/lib/test_binary.py ___________________
ImportError while importing test module '/build/python-construct/src/construct-2.10.70/tests/lib/test_binary.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/lib/test_binary.py:1: in <module>
from tests.declarativeunittest import *
E ModuleNotFoundError: No module named 'tests'
_________________ ERROR collecting tests/lib/test_bitstream.py _________________
ImportError while importing test module '/build/python-construct/src/construct-2.10.70/tests/lib/test_bitstream.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/lib/test_bitstream.py:1: in <module>
from tests.declarativeunittest import *
E ModuleNotFoundError: No module named 'tests'
______________ ERROR collecting tests/lib/test_containers_dict.py ______________
ImportError while importing test module '/build/python-construct/src/construct-2.10.70/tests/lib/test_containers_dict.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/lib/test_containers_dict.py:1: in <module>
from tests.declarativeunittest import *
E ModuleNotFoundError: No module named 'tests'
______________ ERROR collecting tests/lib/test_containers_list.py ______________
ImportError while importing test module '/build/python-construct/src/construct-2.10.70/tests/lib/test_containers_list.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/lib/test_containers_list.py:1: in <module>
from tests.declarativeunittest import *
E ModuleNotFoundError: No module named 'tests'
____________________ ERROR collecting tests/lib/test_hex.py ____________________
ImportError while importing test module '/build/python-construct/src/construct-2.10.70/tests/lib/test_hex.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/lib/test_hex.py:1: in <module>
from tests.declarativeunittest import *
E ModuleNotFoundError: No module named 'tests'
_________________ ERROR collecting tests/lib/test_py3compat.py _________________
ImportError while importing test module '/build/python-construct/src/construct-2.10.70/tests/lib/test_py3compat.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/lib/test_py3compat.py:1: in <module>
from tests.declarativeunittest import *
E ModuleNotFoundError: No module named 'tests'
__________________ ERROR collecting tests/lib/test_search.py ___________________
ImportError while importing test module '/build/python-construct/src/construct-2.10.70/tests/lib/test_search.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/lib/test_search.py:1: in <module>
from tests.declarativeunittest import *
E ModuleNotFoundError: No module named 'tests'
=========================== short test summary info ============================
ERROR tests/deprecated_gallery/test_formats.py
ERROR tests/deprecated_gallery/test_protocols.py
ERROR tests/gallery/test_gallery.py
ERROR tests/lib/test_binary.py
ERROR tests/lib/test_bitstream.py
ERROR tests/lib/test_containers_dict.py
ERROR tests/lib/test_containers_list.py
ERROR tests/lib/test_hex.py
ERROR tests/lib/test_py3compat.py
ERROR tests/lib/test_search.py
!!!!!!!!!!!!!!!!!!! Interrupted: 10 errors during collection !!!!!!!!!!!!!!!!!!!
============================== 10 errors in 1.20s ==============================
==> ERROR: A failure occurred in check().
- link to upstream bug report, if any: https://github.com/construct/construct/issues/1074
Steps to reproduce:
pkgctl repo clone python-construct
pkgctl build python-construct