Skip to content

Update for pytest 8.1

David Douard requested to merge douardda/swh-py-template:pytes81 into master

In our tests, we are using some patterns that are not supported by the importlib mode, like importing test modules from one another.

So switch back to the default prepend mode, but add the consider_namespace_packages option that was introduced in pytest 8.1 so our swh namespace package gets properly detected as such.

For reference, see: https://docs.pytest.org/en/latest/reference/reference.html#confval-consider_namespace_packages

(commit message from Lunar's fix in swh-alter).

Merge request reports