Skip to content

Conversation

@ThomSerg
Copy link
Collaborator

Some of the examples which are included in our test set target very specific solver backends, different from the default OR-Tools. Whilst not an issue on the GitHub runner (since these solvers get installed in the runner), these tests will fail on a brand new install. I'm of the opinion that all tests should pass with the default minimal install. So I made these tests optional, adding the mechanism to define which examples require which specific solvers and skip those examples when that solver is not available.

P.S. Apologies for the typo in the branch, might cause some confusion when trying to checkout the code and the branch does not seem to exist.

@ThomSerg ThomSerg added the simple to review Simple change to review, e.g., a oneliner. label Oct 17, 2025
Copy link
Collaborator

@IgnaceBleukx IgnaceBleukx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though I would prefer to change the variable name (see comment)

if solver == 'minizinc' and any(x in example for x in SKIP_MZN):
return pytest.skip(reason=f"exclude {example} for {solver}, too slow or solver-specific")
# Skip solver specific tests for which the solver is not installed
for skip_name in _SOLVER_SPECIFIC_EXAMPLES_REVERSE.keys():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I find skip_name unintuitive, maybe just example_name?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

simple to review Simple change to review, e.g., a oneliner.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants