Skip to content

Commit

Permalink
fix other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
selmanozleyen committed Dec 12, 2024
1 parent 90b93bb commit c334e47
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/problems/generic/test_sinkhorn_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit c334e47

Please sign in to comment.