Fix crash where IFCTester read directly from IFC in the UI

This commit is contained in:
Dion Moult
2023-09-19 18:15:56 +10:00
parent a5a958d6e2
commit 62bf8c2287
5 changed files with 15 additions and 17 deletions
@@ -34,12 +34,13 @@ class TestFormat():
assert subject.format('title(\"fOo\")') == "Foo"
assert subject.format('concat(\"fOo\", \"bar\")') == "fOobar"
assert subject.format('upper(concat(\"fOo\", \"bar\"))') == "FOOBAR"
assert subject.format('substr(\"foobar\", 3)') == "bar"
assert subject.format('substr(\"foobar\", 1, 2)') == "o"
assert subject.format('substr(\"foobar\", 1, -1)') == "ooba"
def test_number_formatting(self):
assert subject.format("round(123, 5)") == "125.0"
assert subject.format('round(\"123\", 5)') == "125.0"
assert subject.format("round(123, 5)") == "125"
assert subject.format('round(\"123\", 5)') == "125"
assert subject.format('metric_length(123, 5, 2)') == "125.00"
assert subject.format('metric_length(123.123, 0.1, 2)') == "123.10"
assert subject.format('metric_length(\"123\", 5, 2)') == "125.00"