sarugaku / resolvelib

Resolve abstract dependencies into concrete ones
ISC License
138 stars 31 forks source link

Add unvisited tests to ensure backjumping #158

Closed notatallshaw closed 1 month ago

notatallshaw commented 1 month ago

This adds a new category of functional tests for the Pip Provider which is meant to ensure that backjumping is not accidentally broken.

It checks that certain candidates were never visited, because if backjumping is behaving as expected the path to visit them should have never been taken.

Both test cases added here fail if you remove backjumping.

Later it would be worth adding more of these, in particular I have been work on using "kedro" as a real test case, but am having issues with both py2index and pip-resolver-benchmarks (i.e. pip resolves the real world case but doesn't resolve the version captured by either of these tools), if I ever figure it out I will add more test cases.