Changeset 5765


Ignore:
Timestamp:
May 13, 2012 10:06:17 AM (7 years ago)
Author:
wehart
Message:

Changing tests to remove reference to _data[None]

Location:
coopr.pyomo/trunk/coopr/pyomo/tests/unit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/trunk/coopr/pyomo/tests/unit/test_bounds.py

    r5607 r5765  
    2929        self.instance = self.model.create()
    3030        self.instance.pprint()
    31         self.assertEqual(self.instance.constr._data[None].lower(),8.0)
     31        self.assertEqual(self.instance.constr.lower(),8.0)
    3232
    3333    def test_constr_upper(self):
     
    4444        self.instance = self.model.create()
    4545
    46         self.assertEqual(self.instance.constr._data[None].upper(),8.0)
     46        self.assertEqual(self.instance.constr.upper(),8.0)
    4747
    4848    def test_constr_both(self):
     
    5959        self.instance = self.model.create()
    6060
    61         self.assertEqual(self.instance.constr._data[None].lower(),-2.0)
    62         self.assertEqual(self.instance.constr._data[None].upper(),8.0)
     61        self.assertEqual(self.instance.constr.lower(),-2.0)
     62        self.assertEqual(self.instance.constr.upper(),8.0)
    6363
    6464
  • coopr.pyomo/trunk/coopr/pyomo/tests/unit/test_obj.py

    r4153 r5765  
    339339        model.y = Var(initialize=2)
    340340        model.obj = Objective()
    341         model.obj._data[None].expr = model.x+model.y
     341        model.obj.expr = model.x+model.y
    342342        instance = model.create()
    343343        instance.reset()
Note: See TracChangeset for help on using the changeset viewer.