mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Fix #4290. You can now format custom thousands separators and decimal separators in IfcCSV.
This commit is contained in:
@@ -44,6 +44,13 @@ class TestFormat():
|
||||
def test_number_formatting(self):
|
||||
assert subject.format("round(123, 5)") == "125"
|
||||
assert subject.format('round(\"123\", 5)') == "125"
|
||||
assert subject.format('number(123)') == "123"
|
||||
assert subject.format('number(1234.56)') == "1,234.56"
|
||||
assert subject.format('number(123, ".")') == "123"
|
||||
assert subject.format('number(\"123\", ".")') == "123"
|
||||
assert subject.format('number(123.12, ".")') == "123.12"
|
||||
assert subject.format('number(123.12, ",")') == "123,12"
|
||||
assert subject.format('number(1234.12, ",", ".")') == "1.234,12"
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user