Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Galtozzy committed Jan 8, 2025
1 parent 572bb32 commit 45ac2b3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def test_get_full_key_valid_arguments(args_kwargs_signature):

def test_get_full_key_invalid_key_format(args_kwargs_signature):
bound_args = args_kwargs_signature.bind('value1', 'value2')
with pytest.raises(ValueError, match='Arguments in a key do not match function signature'):
with pytest.raises(
ValueError, match=f'Arguments in a key(key_{{}}_{{}}_{{}}) do not match function signature({bound_args})'
):
get_full_key_from_signature(bound_args, 'key_{}_{}_{}')


Expand All @@ -35,7 +37,10 @@ def test_get_full_key_empty_key_and_arguments(args_kwargs_signature):

def test_get_full_key_mixed_placeholders(args_kwargs_signature):
bound_args = args_kwargs_signature.bind('value1', 'value2', arg3='value3')
with pytest.raises(ValueError, match='Arguments in a key do not match function signature'):
with pytest.raises(
ValueError,
match=f'Arguments in a key(key_{{}}_{{}}_{{}}_{{invalid_arg}}) do not match function signature({bound_args})',
):
get_full_key_from_signature(bound_args, 'key_{}_{}_{}_{invalid_arg}')


Expand Down

0 comments on commit 45ac2b3

Please sign in to comment.