Skip to content

Commit

Permalink
Fix test error on macOS 15
Browse files Browse the repository at this point in the history
Some strings passed to strxfrm cause an OSError to be thrown.
It used to be that a ValueError was thrown, but now both
exception types are caught.
  • Loading branch information
SethMMorton committed Oct 11, 2024
1 parent bbf5213 commit 6136fa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_string_component_transform_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ def test_string_component_transform_factory(
assume(input_is_ok_with_locale(x))
try:
assert list(string_component_transform_func(x)) == list(example_func(x))
except ValueError as e: # handle broken locale lib on OSX.
if "is not in range" not in str(e):
except (ValueError, OSError) as e: # handle broken locale lib on OSX.
if all(x not in str(e) for x in ("is not in range", "Invalid argument")):
raise

0 comments on commit 6136fa6

Please sign in to comment.