From c334e474b5e8084432846a37073eb78ff0ac53a4 Mon Sep 17 00:00:00 2001 From: selmanozleyen Date: Thu, 12 Dec 2024 02:43:50 +0100 Subject: [PATCH] fix other tests --- tests/problems/generic/test_sinkhorn_problem.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/problems/generic/test_sinkhorn_problem.py b/tests/problems/generic/test_sinkhorn_problem.py index 5b92aed8..755dc154 100644 --- a/tests/problems/generic/test_sinkhorn_problem.py +++ b/tests/problems/generic/test_sinkhorn_problem.py @@ -160,12 +160,13 @@ def test_pass_arguments(self, adata_time: AnnData, args_to_check: Mapping[str, A solver = problem[(0, 1)].solver.solver args = sinkhorn_solver_args if args_to_check["rank"] == -1 else lr_sinkhorn_solver_args for arg, val in args.items(): - assert hasattr(solver, val), val - el = getattr(solver, val)[0] if isinstance(getattr(solver, val), tuple) else getattr(solver, val) - if arg == "initializer": - assert isinstance(el, Callable) - else: - assert el == args_to_check[arg], arg + if arg != "initializer_kwargs": + assert hasattr(solver, val), val + el = getattr(solver, val)[0] if isinstance(getattr(solver, val), tuple) else getattr(solver, val) + if arg == "initializer": + assert isinstance(el, Callable) + else: + assert el == args_to_check[arg], arg lin_prob = problem[(0, 1)]._solver._problem for arg, val in lin_prob_args.items():