Add ability to force candidates to be evaluated first #25
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.
If the control has side effects that cannot easily be isolated from candidates, then it can be useful to run the candidates before the control. It is easier to write new controls that do not have such side-effects.
This still respects the behaviour of
randomize
, the candidates will still be randomized and the control executed last ifcandidates_first
is true.Note there is a bonus commit to remove a rogue comma in one of the test's expected repr strings that was failing tests locally. I'm not sure I understand why this would not fail on the CI…?Update: it looks like python 3.7 does not have the trailing repr comma, so I have forced pushed without this fix so that it can be fixed separately and more appropriately to work across python versions.Please let me know if you would like me to make any changes.