Skip to content

Commit

Permalink
Merge pull request Pyomo#3337 from mrmundt/issue-3336
Browse files Browse the repository at this point in the history
Bug fix: Issue 3336 - Inconsistent use of `result` and `results`
  • Loading branch information
blnicho committed Aug 8, 2024
2 parents b480497 + 12930fe commit 7f779ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyomo/opt/base/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ def set_results_format(self, format):
Set the current results format (if it's valid for the current
problem format).
"""
if (self._problem_format in self._valid_results_formats) and (
format in self._valid_results_formats[self._problem_format]
if (self._problem_format in self._valid_result_formats) and (
format in self._valid_result_formats[self._problem_format]
):
self._results_format = format
else:
Expand Down
2 changes: 1 addition & 1 deletion pyomo/opt/tests/base/test_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_set_problem_format(self):
def test_set_results_format(self):
opt = pyomo.opt.SolverFactory("stest1")
opt._valid_problem_formats = ['a']
opt._valid_results_formats = {'a': 'b'}
opt._valid_result_formats = {'a': 'b'}
self.assertEqual(opt.problem_format(), None)
try:
opt.set_results_format('b')
Expand Down

0 comments on commit 7f779ab

Please sign in to comment.