Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pixutils/conv/conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def to_bgr888(
# Get list of backends to try
backends = get_backends(options.get('backends') if options else None)
if not backends:
raise ValueError('No backends available')
raise NotImplementedError('No backends available')

size = 0

Expand Down
18 changes: 6 additions & 12 deletions tests/test_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,8 @@ def test_function(self):
rgb_buf = buffer_to_bgr888(
test_case.pixel_format, WIDTH, HEIGHT, 0, src_buf, test_case.options
)
except ValueError as e:
if str(e) == 'No backends available':
self.skipTest('No backend available')
raise
except NotImplementedError as e:
raise unittest.SkipTest('No backend available') from e

src_sha = hashlib.sha256(src_buf.tobytes()).hexdigest()
rgb_sha = hashlib.sha256(rgb_buf.tobytes()).hexdigest()
Expand Down Expand Up @@ -283,10 +281,8 @@ def test_function(self):

try:
rgb_buf = buffer_to_bgr888(fmt, WIDTH, HEIGHT, bpl, test_buf, test_case.options)
except ValueError as e:
if str(e) == 'No backends available':
self.skipTest('No backend available')
raise
except NotImplementedError as e:
raise unittest.SkipTest('No backend available') from e

rgb_sha = hashlib.sha256(rgb_buf.tobytes()).hexdigest()
self.assertEqual(
Expand Down Expand Up @@ -345,10 +341,8 @@ def test_function(self):

try:
rgb_buf = buffer_to_bgr888(fmt, WIDTH, HEIGHT, bpl, test_buf, test_case.options)
except ValueError as e:
if str(e) == 'No backends available':
self.skipTest('No backend available')
raise
except NotImplementedError as e:
raise unittest.SkipTest('No backend available') from e

rgb_sha = hashlib.sha256(rgb_buf.tobytes()).hexdigest()
self.assertEqual(
Expand Down