Skip to content

Commit

Permalink
Improve descriptor validation error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-r-thorpe committed Nov 28, 2024
1 parent 089a33e commit d1403e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nmostesting/MS05Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,9 @@ def sort_key(e):
reference.sort(key=sort_key)
descriptor.sort(key=sort_key)
for refvalue, value in zip(reference, descriptor):
self.validate_descriptor(test, refvalue, value, context)
name = refvalue.name if isinstance(refvalue, NcDescriptor) else \
refvalue["name"] if isinstance(dict, NcDescriptor) else ""
self.validate_descriptor(test, refvalue, value, context=f"{context}{name}: ")
# Compare primitives and primitive arrays directly
elif reference != descriptor:
raise NMOSTestException(test.FAIL(f"{context}Expected value="
Expand Down

0 comments on commit d1403e2

Please sign in to comment.