Skip to content

Commit

Permalink
Added support for Neon instructions in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cykooz committed May 15, 2024
1 parent f026ff5 commit d436ce3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
!/.gitignore
!/.github
!/.ruff.toml
__pycache__
/dist
/tests/data/result
/python/cykooz/resizer/*.so
Expand Down
4 changes: 2 additions & 2 deletions tests/test_alpha.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_multiply_alpha_pil(
mul_div = AlphaMulDiv()
mul_div.cpu_extensions = cpu_extensions
if mul_div.cpu_extensions != cpu_extensions:
raise pytest.skip(f'{cpu_extensions} instruction not supported by CPU')
raise pytest.skip(f'{cpu_extensions.name} instruction not supported by CPU')

image = source_image.copy()
assert get_image_checksum(image.tobytes('raw')) == Checksum(
Expand Down Expand Up @@ -106,7 +106,7 @@ def test_divide_alpha_pil(
mul_div = AlphaMulDiv()
mul_div.cpu_extensions = cpu_extensions
if mul_div.cpu_extensions != cpu_extensions:
raise pytest.skip(f'{cpu_extensions} instruction not supported by CPU')
raise pytest.skip(f'{cpu_extensions.name} instruction not supported by CPU')

image = source_image.copy()
if image.mode != 'RGBa':
Expand Down
4 changes: 2 additions & 2 deletions tests/test_resizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def _resize_raw(
resizer = Resizer()
resizer.cpu_extensions = cpu_extensions
if resizer.cpu_extensions != cpu_extensions:
raise pytest.skip(f'{cpu_extensions} instruction not supported by CPU')
raise pytest.skip(f'{cpu_extensions.name} instruction not supported by CPU')

resizer.resize(
src_image,
Expand Down Expand Up @@ -124,7 +124,7 @@ def _resize_pil(
resizer = Resizer()
resizer.cpu_extensions = cpu_extensions
if resizer.cpu_extensions != cpu_extensions:
raise pytest.skip(f'{cpu_extensions} instruction not supported by CPU')
raise pytest.skip(f'{cpu_extensions.name} instruction not supported by CPU')

resizer.resize_pil(
src_image,
Expand Down

0 comments on commit d436ce3

Please sign in to comment.