You can now choose both input and output units for imperial formatting

This commit is contained in:
Dion Moult
2023-09-07 12:18:32 +10:00
parent 41c6830ee0
commit e7a90b5597
4 changed files with 95 additions and 20 deletions
@@ -45,7 +45,8 @@ class TestFormat():
assert subject.format('imperial_length(3.123, 1)') == "3' - 1\""
assert subject.format('imperial_length(3.123, 2)') == "3' - 1 1/2\""
assert subject.format('imperial_length(\"3.123\", 2)') == "3' - 1 1/2\""
assert subject.format('imperial_length(\"123.123\", 2, \"inch\")') == "10' - 3\""
assert subject.format('imperial_length(\"123.123\", 2, \"inch\", \"foot\")') == "10' - 3\""
assert subject.format('imperial_length(\"123.123\", 2, \"inch\", \"inch\")') == "123\""
class TestGetElementValue(test.bootstrap.IFC4):