def validate_EEIO_model(model): """ Validates EEIO model :param model: A useeiopy Model object :return: None, writes validation out to file """ import iomb.validation as v valid = v.validate(model.model) valid.display_count = -1 f = open(model.path + model.name + '_validate.txt', 'w') f.write(valid.__str__()) f.close()
def test_is_valid(self): vr = validation.validate(self.model) self.assertFalse(vr.failed)
def test_not_a_model(self): v = validation.validate('not a model') self.assertTrue(v.failed)
def validate(model, modelname, modelpath): valid = v.validate(model) valid.display_count = -1 f = open(modelpath + modelname + '_validate.txt', 'w') f.write(valid.__str__()) f.close()