From 4a2ff0fef89765f1e0f766b066e63a8988df5e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 17 Aug 2020 14:03:11 +0200 Subject: Tests: Better error reporting in `AbstractAlembicTest` Instead of checking for the length of a list, just handle the error that occurs when the length is incorrect. No functional changes to any actual test. --- tests/python/alembic_tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/python') diff --git a/tests/python/alembic_tests.py b/tests/python/alembic_tests.py index c911634ba12..448048d0f17 100644 --- a/tests/python/alembic_tests.py +++ b/tests/python/alembic_tests.py @@ -104,9 +104,11 @@ class AbstractAlembicTest(AbstractBlenderRunnerTest): if proptype == 'CompoundProperty': # To read those, call self.abcprop() on it. continue - if len(parts) < 2: - raise ValueError('Error parsing result from abcprop: %s' % info.strip()) - valtype_and_arrsize, name_and_extent = parts[1:] + + try: + valtype_and_arrsize, name_and_extent = parts[1:] + except ValueError as ex: + raise ValueError('Error parsing result from abcprop "{info.strip()}": {ex}') from ex # Parse name and extent m = self.abcls_array.match(name_and_extent) -- cgit v1.2.3