Skip to content

Commit

Permalink
Merge pull request Pyomo#3095 from jsiirola/nlv2_eliminated_vars_data…
Browse files Browse the repository at this point in the history
…type

Add `to_expr()` to AMPLRepn, fix NLWriterInfo return type
  • Loading branch information
michaelbynum authored Jan 18, 2024
2 parents 6d392a8 + 73820cc commit 74f18cf
Show file tree
Hide file tree
Showing 4 changed files with 223 additions and 181 deletions.
14 changes: 14 additions & 0 deletions pyomo/common/unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,20 @@ def assertRaisesRegex(self, expected_exception, expected_regex, *args, **kwargs)
context = contextClass(expected_exception, self, expected_regex)
return context.handle('assertRaisesRegex', args, kwargs)

def assertExpressionsEqual(self, a, b, include_named_exprs=True, places=None):
from pyomo.core.expr.compare import assertExpressionsEqual

return assertExpressionsEqual(self, a, b, include_named_exprs, places)

def assertExpressionsStructurallyEqual(
self, a, b, include_named_exprs=True, places=None
):
from pyomo.core.expr.compare import assertExpressionsStructurallyEqual

return assertExpressionsStructurallyEqual(
self, a, b, include_named_exprs, places
)


class BaselineTestDriver(object):
"""Generic driver for performing baseline tests in bulk
Expand Down
Loading

0 comments on commit 74f18cf

Please sign in to comment.