Closed suutari-ai closed 8 months ago
This change causes a test failure with one of the existing Pytest 6.2.x-based workflows, so we would either need to change the code to support both 6.x and 7.x, or else drop support for Pytest <7.0. My preference would be to support backwards compatibility in this case.
Thanks for the comments!
I updated the PR to use startdir for pytest 6 or lower and start_path otherwise. Tests should now pass with both pytest 6 and 7. Also tested with pytest 8.0.0rc2 and it seems to work too which is an improvement to the previous code, which failed with pytest 8.
Use the start_path parameter instead of startdir, since Pytest 7 yield the following deprecation warning if startdir is being used:
Details of the Pytest deprecation can be found from: https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
Fixes #232