Refactor Polarization Corrections Tests #39961
Open
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.
Description of work
This is a maintenance issue. Many of the tests for the sans polarization corrections algorithms can share similar test data, however every tests for each polarization algorithm has its own set of helper functions to create a workspace group suitable for polarization algorithms. I have tried to unify all this helper functions into a new file
PolarizationCorrectionsTestsUtils
, which is already recycled from a helper file used in the analyser efficiency tests.The two main changes are the inclusion of a helper function
createPolarizedTestGroup
that can be used in all the polarization correction tests and a struct to hold the main parameters of the workspaces and efficiency functions.Note: I have set the release to 6.15 as there is no hurry to get this reviewed before code freeze for 6.14 if there are more important PRs to review.
No associated issue.
To test:
Release notes no necessary as it is internal change for tests only
Reviewer
Your comments will be used as part of the gatekeeper process. Comment clearly on what you have checked and tested during your review. Provide an audit trail for any changes requested.
As per the review guidelines:
Gatekeeper
As per the gatekeeping guidelines: