Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pytest8 #66

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

micdahl
Copy link

@micdahl micdahl commented May 7, 2024

With pytest8, the file collection phase has changed: https://docs.pytest.org/en/8.0.x/changelog.html#collection-changes
To take into account Odoo's name binding with "odoo.addons"-prefix, the OdooTestPackage and OdooTestModule classes use adapted functions to compute the module name.

Also "--odoo-ignore-env" option is introduced, as the USER environment variable is set on some linux systems per default, which causes problems as it automatically is used for the Odoo database name. With the --odoo-ignore-env option set, environment variables are ignored and the options given via config options are used.

[FIX] unpretended use of environment variables

Some environment variables (especially $USER) are automatically set by the OS.
pytest-odoo uses this variable as Odoo's database user, if set.
To prevent this, "odoo-ignore-env" option is introduced.
When set, pytest-odoo ignores environment variables and uses the values
given by the other config parameters or the config file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant