CIL icon indicating copy to clipboard operation
CIL copied to clipboard

Remove NotImplementedError pass on the out unit tests for the algorithm class

Open MargaretDuff opened this issue 1 year ago • 0 comments

Description

Instead of allowing tests to pass with a not implemented error e.g.

https://github.com/TomographicImaging/CIL/blob/b3d8ffeeec9413a3b54264e4097a445d2ef5b88b/Wrappers/Python/test/test_out_in_place.py#L164 https://github.com/TomographicImaging/CIL/blob/b3d8ffeeec9413a3b54264e4097a445d2ef5b88b/Wrappers/Python/test/test_out_in_place.py#L146 https://github.com/TomographicImaging/CIL/blob/b3d8ffeeec9413a3b54264e4097a445d2ef5b88b/Wrappers/Python/test/test_out_in_place.py#L132

We should add to the list of functions to test, which tests we want to run e.g. instead of (function, geometry) we should have (function, geometry, bool, bool, bool) with the three booleans corresponding to test proximal_conjugate, test_proximal and test_gradient True/False:

https://github.com/TomographicImaging/CIL/blob/b3d8ffeeec9413a3b54264e4097a445d2ef5b88b/Wrappers/Python/test/test_out_in_place.py#L86-L114

The danger of the NotImplementedError was highlighted by https://github.com/TomographicImaging/CIL/issues/1854.

Similarly, for the operator tests and https://github.com/TomographicImaging/CIL/blob/b3d8ffeeec9413a3b54264e4097a445d2ef5b88b/Wrappers/Python/test/test_out_in_place.py#L260 https://github.com/TomographicImaging/CIL/blob/b3d8ffeeec9413a3b54264e4097a445d2ef5b88b/Wrappers/Python/test/test_out_in_place.py#L273 https://github.com/TomographicImaging/CIL/blob/b3d8ffeeec9413a3b54264e4097a445d2ef5b88b/Wrappers/Python/test/test_out_in_place.py#L290

MargaretDuff avatar Jul 08 '24 14:07 MargaretDuff