diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-08-17 15:03:11 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-08-17 15:07:45 +0300 |
commit | 4a2ff0fef89765f1e0f766b066e63a8988df5e98 (patch) | |
tree | 87c5a4212068274e9d9dc1ae2950ad0a2a471351 /tests | |
parent | 38752944f871d78feffc7a699ac475e5eef9e130 (diff) |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/python/alembic_tests.py | 8 |
1 files changed, 5 insertions, 3 deletions
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) |