示例#1
0
    def test_has_model(self):
        from libcellml import ImportSource, Model

        x = ImportSource()
        model = Model()
        self.assertFalse(x.hasModel())
        x.setModel(model)
        self.assertTrue(x.hasModel())
        x.removeModel()
        self.assertFalse(x.hasModel())
    def test_has_model(self):
        from libcellml import ImportSource, Model

        # bool hasModel() const;
        x = ImportSource()
        self.assertFalse(x.hasModel())
        x.setModel(Model())
        self.assertTrue(x.hasModel())
        x.setModel(None)
        self.assertFalse(x.hasModel())