Пример #1
0
    def test_get_component(self):
        from libcellml import Error, Component

        # ComponentPtr getComponent()
        e = Error()
        self.assertIsNone(e.getComponent())
        name = 'cellml'
        c = Component()
        c.setName(name)
        e.setComponent(c)
        self.assertIsInstance(e.getComponent(), Component)
        self.assertEqual(e.getComponent().getName(), name)
Пример #2
0
    def test_set_component(self):
        from libcellml import Error, Component

        # void setComponent(const ComponentPtr &component)
        e = Error()
        e.setComponent(Component())