コード例 #1
0
    def test_get_objects(self):
        """Test if get_objects works with empty mother model"""

        sim = Simulation('LinkedCapacities')
        obj = sim.get_objects()
        obj_sorted = sorted(obj)
        self.assertEqual(obj_sorted, sorted([u'c1', u'c2', 'r']))
コード例 #2
0
 def test_get_objects(self):
     """Test if get_objects works with empty mother model"""
     
     sim = Simulation('LinkedCapacities') 
     obj = sim.get_objects()
     obj_sorted = sorted(obj)
     self.assertEqual(obj_sorted, sorted([u'c1', u'c2','r']))
コード例 #3
0
 def test_get_objects_with_mother(self):
     """Test if get_objects works with empty mother model"""
     
     sim = Simulation('LinkedCapacities') 
     obj = sim.get_objects(mother = 'c1')
     obj_sorted = sorted(obj)
     self.assertEqual(obj_sorted, sorted(['heatPort', 'C', u'T', u'der(T)']))                
コード例 #4
0
 def test_get_objects_with_mother(self):
     """Test if get_objects works with empty mother model"""
     
     sim = Simulation('LinkedCapacities') 
     obj = sim.get_objects(mother = 'c1')
     obj_sorted = sorted(obj)
     self.assertEqual(obj_sorted, sorted(['heatPort', 'C', u'T', u'der(T)']))