Skip to content

Commit

Permalink
TestCase.assertDictContainsSubset is deprecated (as of python 3.12)
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-schmid committed Feb 12, 2025
1 parent 65cd920 commit 316f33b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions climada/util/calibrate/test/test_bayesian_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,9 @@ def test_optimizer_params(self):
)
result = contr.optimizer_params()

self.assertDictContainsSubset(
{
"init_points": 1,
"n_iter": 2,
},
result,
)
self.assertEqual(result.get("init_points"), 1)
self.assertEqual(result.get("n_iter"), 2)

util_func = result["acquisition_function"]
self.assertEqual(util_func.kappa, 3)
self.assertEqual(util_func._kappa_decay, contr._calc_kappa_decay())
Expand Down

0 comments on commit 316f33b

Please sign in to comment.