camptocamp / pytest-odoo

pytest plugin to run Odoo tests
GNU Affero General Public License v3.0
67 stars 41 forks source link

Add support for pytest 8 #65

Closed micdahl closed 2 months ago

micdahl commented 2 months ago

Package and Module collection has changed in pytest 8 (see https://docs.pytest.org/en/stable/changelog.html#collection-changes). To take care of the Odoo namespaces, OdooTestModule and OdooTestPackage classes have been introduced.

micdahl commented 2 months ago

The second commit adds --odoo-ignore-env. When this option is set, environment variables are ignored for odoo parameters. In my environment, the USER environment variable is always set automatically. This lead to problems running pytest-odoo, as my database username has always been set from the USER environment variable, instead of the Odoo config file.

micdahl commented 2 months ago

I will do so. Will be back with the new commits

micdahl commented 2 months ago

I have created #66, where the changes are included in the existing pytest_odoo file. So, this pull request is closed.