Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adekusar-drl committed Jul 21, 2020
1 parent 25a99ef commit c12852b
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions test/optimization/test_admm.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,16 @@ def test_quad_constraints(self):

def test_admm_setters_getters(self):
"""Tests get/set properties of ADMMOptimizer"""
try:
optimizer = ADMMOptimizer()
self.assertEqual(optimizer.parameters.maxiter, 10)

optimizer = ADMMOptimizer()
self.assertEqual(optimizer.parameters.maxiter, 10)
optimizer.parameters.maxiter = 11
self.assertEqual(optimizer.parameters.maxiter, 11)

optimizer.parameters.maxiter = 11
self.assertEqual(optimizer.parameters.maxiter, 11)
params = ADMMParameters(maxiter=12)
optimizer.parameters = params
self.assertEqual(optimizer.parameters.maxiter, 12)

params = ADMMParameters(maxiter=12)
optimizer.parameters = params
self.assertEqual(optimizer.parameters.maxiter, 12)
except NameError as ex:
self.skipTest(str(ex))

0 comments on commit c12852b

Please sign in to comment.