BuildingSmart IFCRail changes to BIMTester (#1309)

* Add a way to validate the IFC file in BIMTester

* Fix an issue in Report where only the first error was shown

* Fix the usage of Schema in BIMTester

* Add Aggreation steps to BIMTester
This commit is contained in:
rbertucat
2021-02-11 23:34:10 +01:00
committed by GitHub
parent 1d6b2dcb37
commit 20fe48bd6a
8 changed files with 260 additions and 16 deletions
+5 -9
View File
@@ -93,9 +93,7 @@ class ReportGenerator:
step["result"] = {}
step["result"]["status"] = "skipped"
step["result"]["duration"] = 0
step["result"][
"error_message"
] = "This requirement has been skipped due to a previous failing step."
step["result"]["error_message"] = "This requirement has been skipped due to a previous failing step."
elif step["result"]["status"] == "undefined":
step["result"] = {}
step["result"]["status"] = "undefined"
@@ -108,14 +106,12 @@ class ReportGenerator:
"is_success": step["result"]["status"] == "passed",
"is_unspecified": step["result"]["status"] == "undefined",
"is_skipped": step["result"]["status"] == "skipped",
"error_message": None
if step["result"]["status"] == "passed"
else step["result"]["error_message"],
"error_message": None if step["result"]["status"] == "passed" else step["result"]["error_message"],
}
# TODO: there is probably a better way of doing this
if isinstance(data["error_message"], list):
data["error_message"] = data["error_message"][1]
# Remove the first "Assertion Failed" message
if isinstance(data["error_message"], list) and data["error_message"]:
data["error_message"].pop(0)
return data
def get_template_strings(self):