Skip to content

Commit 7bf5dc1

Browse files
author
Sylvain MARIE
committed
Fixed test on 3.12.4
1 parent d6c84a2 commit 7bf5dc1

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

tests/test_partial_and_macros.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,13 @@ def f(a, b, c, **d):
162162
fp_ref = functools.partial(f, b=0)
163163

164164
# but 'signature' does not support it !
165-
with pytest.raises(ValueError):
166-
signature(fp_ref)
167-
168-
# assert str(signature(fp_ref)) == "(c, /, *, d, **e)"
165+
if sys.version_info < (3, 12, 4):
166+
with pytest.raises(ValueError):
167+
signature(fp_ref)
168+
else:
169+
assert str(signature(fp_ref)) == "(a, c, /, *, d, **e)"
169170

171+
# TODO https://github.com/smarie/python-makefun/issues/107
170172
# so we do not support it
171173
with pytest.raises(NotImplementedError):
172174
makefun.partial(f, b=0)

0 commit comments

Comments
 (0)