Skip to content

Commit

Permalink
Add more base unit tets
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmundt committed Feb 1, 2024
1 parent a0ad77e commit 248ffd5
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion pyomo/contrib/solver/tests/unit/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,20 @@ def test_context_manager(self):


class TestLegacySolverWrapper(unittest.TestCase):
pass
def test_class_method_list(self):
expected_list = [
'available',
'license_is_valid',
'solve'
]
method_list = [
method for method in dir(base.LegacySolverWrapper) if method.startswith('_') is False
]
self.assertEqual(sorted(expected_list), sorted(method_list))

def test_context_manager(self):
with base.LegacySolverWrapper() as instance:
with self.assertRaises(AttributeError) as context:
instance.available()


0 comments on commit 248ffd5

Please sign in to comment.