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
Here is the stack-trace i get when trying to run a test with pytest version 8
`
pytest --odoo-database ------ odoo/addons/xxx_mrp_machine_cycle/tests
===================================================================================================================================================================== test session starts ======================================================================================================================================================================
platform linux -- Python 3.11.2, pytest-8.2.0, pluggy-1.5.0
rootdir: ------
configfile: pyproject.toml
plugins: anyio-4.3.0, odoo-1.0.0, cov-4.1.0
collected 0 items / 1 error
============================================================================================================================================================================ ERRORS ============================================================================================================================================================================
______________________________________________________________________________________________________________________________________ ERROR collecting odoo/addons/xxx_mrp_machine_cycle/tests/test_mrp_machine_cycle.py ______________________________________________________________________________________________________________________________________
../../.pyenv/versions/3.11.2/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1206: in _gcd_import
???
<frozen importlib._bootstrap>:1178: in _find_and_load
???
<frozen importlib._bootstrap>:1128: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:241: in _call_with_frames_removed
???
<frozen importlib._bootstrap>:1206: in _gcd_import
???
<frozen importlib._bootstrap>:1178: in _find_and_load
???
<frozen importlib._bootstrap>:1128: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:241: in _call_with_frames_removed
???
<frozen importlib._bootstrap>:1206: in _gcd_import
???
<frozen importlib._bootstrap>:1178: in _find_and_load
???
<frozen importlib._bootstrap>:1149: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:690: in _load_unlocked
???
<frozen importlib._bootstrap_external>:940: in exec_module
???
<frozen importlib._bootstrap>:241: in _call_with_frames_removed
???
odoo/addons/xxx_mrp_machine_cycle/__init__.py:1: in <module>
from . import models
odoo/addons/xxx_mrp_machine_cycle/models/__init__.py:1: in <module>
from . import mrp_machine_cycle
odoo/addons/xxx_mrp_machine_cycle/models/mrp_machine_cycle.py:10: in <module>
class MrpMachineCycle(models.Model):
../../.virtualenvs/odoo----/lib/python3.11/site-packages/odoo/models.py:152: in __new__
assert module.startswith('odoo.addons.'), \
E AssertionError: Invalid import of xxx_mrp_machine_cycle.models.mrp_machine_cycle.MrpMachineCycle, it should start with 'odoo.addons'.
=================================================================================================================================================================== short test summary info ====================================================================================================================================================================
ERROR odoo/addons/xxx_mrp_machine_cycle/tests/test_mrp_machine_cycle.py - AssertionError: Invalid import of xxx_mrp_machine_cycle.models.mrp_machine_cycle.MrpMachineCycle, it should start with 'odoo.addons'.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================================================================================================================= 1 error in 0.33s =======================================================================================================================================================================
Here is the stack-trace i get when trying to run a test with pytest version 8
`
`
when downgrading to pytest version 7 -> it works
@sbidoul
The text was updated successfully, but these errors were encountered: