Skip to content

Commit

Permalink
chore: tell which simd extension is not available when skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Jun 2, 2024
1 parent 2936f0d commit b4fb134
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def simd(request: pytest.FixtureRequest) -> Iterator[int]:

flag = compile_flags[simd_id]
if flag != 0 and not flag & runtime_flags: # pragma: no branch
pytest.skip("SIMD extension not available") # pragma: no cover
simd_name = _get_simd_name(simd_id) # pragma: no cover
pytest.skip(f"{simd_name!r} SIMD extension not available") # pragma: no cover
old_flag = pybase64._get_simd_path() # type: ignore[attr-defined]
pybase64._set_simd_path(flag) # type: ignore[attr-defined]
assert pybase64._get_simd_path() == flag # type: ignore[attr-defined]
Expand Down

0 comments on commit b4fb134

Please sign in to comment.