pytest-odoo icon indicating copy to clipboard operation
pytest-odoo copied to clipboard

Support Odoo 18

Open petrus-v opened this issue 4 months ago • 1 comments

Just open this issue as self remember from fist try

  • In odoo 18 there is a change (https://github.com/odoo/odoo/commit/ccf3c1ed3949f3307909678efe1245aa92ef752f) that expect unit test launcher
                if not result.wasSuccessful() and BaseCase._tests_run_count != 1:
                    _logger.runbot('Disabling auto-retry after a failed test')
                    BaseCase._tests_run_count = 1

wasSuccessful does not exists while launching test using pytest. commenting those lines seems to works as an ungly workaround.

  • Also we get an logging error because configuration seems to be changed a bit late which was introduce by this commit https://github.com/odoo/odoo/commit/1f3a15a7d1f527ab05937810b6a1fb60c22ff455#diff-80aef099e5fb41cc09e699d35b749152aca50caf5b0bc16c400081c29023fbecR95

  • Also a warning is shown while open registry: `` `/.venv/lib/python3.12/site-packages/pytest_odoo.py:167: DeprecationWarning: Use directly odoo.modules.registry.Registry odoo.registry(db_name)

I (we) needs to spend more time to investigate a bit more and properly fix that some how

petrus-v avatar Oct 15 '24 08:10 petrus-v