MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / PropertyResult

Class PropertyResult

src/ifctester/ifctester/facet.py:1150–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1148
1149
1150class PropertyResult(Result):
1151 def to_string(self):
1152 if self.reason["type"] == "NOPSET":
1153 return "The required property set does not exist"
1154 elif self.reason["type"] == "NOVALUE":
1155 return "The property set does not contain the required property"
1156 elif self.reason["type"] == "DATATYPE":
1157 return f"The property's data type \"{str(self.reason['actual'])}\" does not match the required data type of \"{str(self.reason['dataType'])}\""
1158 elif self.reason["type"] == "VALUE":
1159 if isinstance(self.reason["actual"], list):
1160 if len(self.reason["actual"]) == 1:
1161 return f"The property value \"{str(self.reason['actual'][0])}\" does not match the requirements"
1162 else:
1163 return f"The property values \"{str(self.reason['actual'])}\" do not match the requirements"
1164 else:
1165 return f"The property value \"{str(self.reason['actual'])}\" does not match the requirements"
1166 elif self.reason["type"] == "PROHIBITED":
1167 return f"The property should not have met the requirement"
1168
1169
1170class MaterialResult(Result):

Callers 1

__call__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected