See #2783. Don't show 0 durations for clarity.

This commit is contained in:
Dion Moult
2025-04-21 22:59:14 +10:00
parent d1b1b08174
commit 426f1b91f2
2 changed files with 5 additions and 2 deletions
@@ -23,5 +23,6 @@ import ifcopenshell.util.date as subject
class TestReadableIFCDuration():
def test_run(self):
assert subject.readable_ifc_duration("P0Y0M1DT16H0M0S") == "1D 16h"
assert subject.readable_ifc_duration("P2Y3M1W4DT5H45M30S") == "2Y 3M 1W 4D 5h 45m 30s"
assert subject.readable_ifc_duration("PT40H") == "40h"