Skip to content

Commit

Permalink
Test that conversion_method returns the function
Browse files Browse the repository at this point in the history
  • Loading branch information
wesselb committed Mar 25, 2024
1 parent c112e00 commit c372312
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_promotion.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ def num_to_fp(x):
assert convert(r, Num) == r
assert convert(r, Rat) == 3.0

# Test that `conversion_method` returns the function.
assert num_to_fp(1) == 3.0


def test_convert_resolve_type_hints(convert):
add_conversion_method(int, float, lambda x: 2.0)
Expand Down

0 comments on commit c372312

Please sign in to comment.