-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Description
Instead of allowing tests to pass with a not implemented error e.g.
CIL/Wrappers/Python/test/test_out_in_place.py
Line 164 in b3d8ffe
except (InPlaceError, NotImplementedError): |
CIL/Wrappers/Python/test/test_out_in_place.py
Line 146 in b3d8ffe
except (InPlaceError, NotImplementedError): |
CIL/Wrappers/Python/test/test_out_in_place.py
Line 132 in b3d8ffe
except NotImplementedError: |
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:
CIL/Wrappers/Python/test/test_out_in_place.py
Lines 86 to 114 in b3d8ffe
self.func_geom_test_list = [ | |
(IndicatorBox(), ag), | |
(KullbackLeibler(b=b, backend='numba'), ag), | |
(KullbackLeibler(b=b, backend='numpy'), ag), | |
(L1Norm(), ag), | |
(L1Norm(), ig), | |
(L1Norm(b=b), ag), | |
(L1Norm(b=b, weight=b), ag), | |
(TranslateFunction(L1Norm(), b), ag), | |
(TranslateFunction(L2NormSquared(), b), ag), | |
(L2NormSquared(), ag), | |
(scalar * L2NormSquared(), ag), | |
(SumFunction(L2NormSquared(), scalar * L2NormSquared()), ag), | |
(SumScalarFunction(L2NormSquared(), 3), ag), | |
(ConstantFunction(3), ag), | |
(ZeroFunction(), ag), | |
(L2NormSquared(b=b), ag), | |
(L2NormSquared(), ag), | |
(LeastSquares(A, b_ig, c, weight_ls), ig), | |
(LeastSquares(A, b_ig, c), ig), | |
(WeightedL2NormSquared(weight=b_ig), ig), | |
(TotalVariation(backend='c', warm_start=False, max_iteration=100), ig), | |
(TotalVariation(backend='numpy', warm_start=False, max_iteration=100), ig), | |
(OperatorCompositionFunction(L2NormSquared(), A), ig), | |
(MixedL21Norm(), bg), | |
(SmoothMixedL21Norm(epsilon=0.3), bg), | |
(MixedL11Norm(), bg), | |
(BlockFunction(L1Norm(),L2NormSquared()), bg), | |
(L1Sparsity(WaveletOperator(ig)), ig) |
The danger of the NotImplementedError
was highlighted by #1854.
Similarly, for the operator tests and
CIL/Wrappers/Python/test/test_out_in_place.py
Line 260 in b3d8ffe
except NotImplementedError: |
CIL/Wrappers/Python/test/test_out_in_place.py
Line 273 in b3d8ffe
except (InPlaceError, NotImplementedError): |
CIL/Wrappers/Python/test/test_out_in_place.py
Line 290 in b3d8ffe
except (InPlaceError, NotImplementedError): |
Metadata
Metadata
Assignees
Labels
Type
Projects
Status