format unit properly in the case of nested arrays

The unit is shown at the end of nested arrays.

Change-Id: I235bc40e61161e09a7b00cd1e186d8d8c1769d89
Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30734
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2023-03-21 12:41:20 +01:00
parent 7186759435
commit bf809b4b9a
2 changed files with 12 additions and 2 deletions

View File

@@ -420,6 +420,9 @@ def test_ArrayOf():
dt = ArrayOf(EnumType('myenum', single=0), 5)
copytest(dt)
dt = ArrayOf(ArrayOf(FloatRange(unit='m')))
assert dt.format_value([[0, 1], [2, 3]]) == '[[0, 1], [2, 3]] m'
def test_TupleOf():
# test constructor catching illegal arguments