From dc21daf180b0d54d4349c415c134931f499459c5 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Fri, 26 Apr 2024 14:43:28 +0100 Subject: [PATCH] Fix test failure on Python 3.11.9/3.12.3/main --- cytoolz/tests/test_inspect_args.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cytoolz/tests/test_inspect_args.py b/cytoolz/tests/test_inspect_args.py index b2c5669..fb0bb7f 100644 --- a/cytoolz/tests/test_inspect_args.py +++ b/cytoolz/tests/test_inspect_args.py @@ -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