Python: remove the time limits from the tests - #629
Merged
Merged
Conversation
Tests run with a time limit depend on the speed of the machine, so they aren't reliable on the CI runners. - Remove the 'test_time_limit' tests (onedimensional, rectangle, boxstacks), which only checked the time limit. - Remove the time limit of the 'quiet_parameters' helpers (irregular, boxstacks), of the axle weight test and of the keyboard interrupt tests. - The tests of the LP and column generation algorithms (box, onedimensional, rectangle, rectangleguillotine) and the 'optimize' helpers of 'test_infeasibility.py' and 'test_item_fits.py' ran in anytime mode with a time limit: they now run in 'NotAnytimeSequential' mode without one. - 'test_parameters' still checks the 'time_limit' setter, but resets it before optimizing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Several Python tests ran with a time limit. Their result then depends on the speed of the machine, which isn't reliable on the CI runners. That's how
test_time_limitfailed on Windows in #616. The C++ unit tests no longer use time limits (#622).Fix
test_time_limit(onedimensional, rectangle, boxstacks)quiet_parameters(irregular, boxstacks)NotAnytimeSequential, no limitoptimizehelpers oftest_infeasibility.pyandtest_item_fits.pyNotAnytimeSequential, no limittest_keyboard_interrupt(rectangle, boxstacks)test_parameters(all types)The unused
large_bin_packing_instancehelper of the onedimensional tests is removed.Testing
test_knapsack_hole, fixed by irregular: keep the holes of item types copied from another instance #627), in 3 s. The slowest tests are the two keyboard interrupt tests (0.8 s and 0.5 s).scripts/run_tests.pyregression tests don't use time limits.