Skip to content

Commit

Permalink
Fix test failure on Python 3.11.9/3.12.3/main
Browse files Browse the repository at this point in the history
  • Loading branch information
cjwatson committed Apr 24, 2024
1 parent 7a0382e commit e9e7b64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion toolz/tests/test_inspect_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ def __wrapped__(self):
wrapped = Wrapped(func)
assert inspect.signature(func) == inspect.signature(wrapped)

assert num_required_args(Wrapped) is None
# Python 3.11.9/3.12.3/3.13.0 added inspect.signature support for custom
# callables; before then, this returned None.
assert num_required_args(Wrapped) in (None, 1)
_sigs.signatures[Wrapped] = (_sigs.expand_sig((0, lambda func: None)),)
assert num_required_args(Wrapped) == 1

0 comments on commit e9e7b64

Please sign in to comment.