def test_id(self): from libcellml import Model # std::string id() x = Model() self.assertEqual(x.id(), '') # void setId(const std::string &id) idx = 'test' x.setId(idx) self.assertEqual(x.id(), idx)
def test_ids(self): from libcellml import Model m = Model() self.assertEqual('', m.id()) self.assertEqual('', m.encapsulationId()) m.setId('main_model') m.setEncapsulationId('model_encapsulation') self.assertEqual('main_model', m.id()) self.assertEqual('model_encapsulation', m.encapsulationId())
def test_inheritance(self): import libcellml from libcellml import Model x = Model() self.assertIsInstance(x, libcellml.componententity.ComponentEntity) self.assertIsInstance(x, libcellml.namedentity.NamedEntity) self.assertIsInstance(x, libcellml.entity.Entity) # Test access to inherited methods x = Model() idx = 'test' self.assertEqual(x.id(), '') x.setId(idx) self.assertEqual(x.id(), idx)