Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add is_reference API #1740

Merged
merged 12 commits into from
Jan 19, 2021
Prev Previous commit
Next Next commit
test to cover base class owns_data
  • Loading branch information
Robbybp committed Dec 28, 2020
commit 84a3943cae08302624f8578ced0c92449a18980d
6 changes: 6 additions & 0 deletions pyomo/core/tests/unit/test_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ def test_component_data_pprint(self):
'2 : None : None : None : False : True : Reals\n'
self.assertEqual(correct_s, stream.getvalue())

def test_owns_data(self):
m = ConcreteModel()
class _NotSpecified(object):
pass
m.comp = Component(ctype=_NotSpecified)
self.assertTrue(m.comp.owns_data())

class TestEnviron(unittest.TestCase):

Expand Down