We could use a new assertion that can use more complex filters (i.e. more than just the single-line filtering supported by assertFileEqualsBaseline).
The idea is to accept two new parameters:
a filter function that takes a stream / string and returns filtered stream / string.
a comparison function
The motivating case is checking PICO results with a non-zero optimality gap: the filter would parse through the result file and identify and return the final solution, and the comparison function would implement "assertLessThan(result, baseline*(1+gap))"
We could use a new assertion that can use more complex filters (i.e. more than just the single-line filtering supported by assertFileEqualsBaseline).
The idea is to accept two new parameters:
The motivating case is checking PICO results with a non-zero optimality gap: the filter would parse through the result file and identify and return the final solution, and the comparison function would implement "assertLessThan(result, baseline*(1+gap))"