Skip to content

Make system tests compatible with pytest 8.0.0+

Nicki Křížek requested to merge nicki/pytest-v8-compat into main

The pytest collection mechanism has been overhauled in pytest 8.0.0, resulting in a different node tree when collecting the tests. Ensure the paths / names we're using that are derived from the node tree are consistent across different pytest versions.

Particularly, this has affected the convenience symlink name (which is supposed to be in the form of e.g. dns64_sh_dns64 for the dns64 module and tests_sh_dns64.py module) and the test name that's logged at the start of the test, which is supposed to include the system test directory relative to the root system test directory as well as the module name (e.g. dns64/tests_sh_dns64.py).

Related https://github.com/pytest-dev/pytest/issues/7777

Merge request reports