Skip to content

Conversation

cbouss
Copy link
Contributor

@cbouss cbouss commented Sep 12, 2025

Fix test failure with pytest 8+ highlighter function signature

The assert_argument_introspection function was failing because the lambda
function passed to util._compare_eq_iterable only accepted positional
arguments, but pytest 8+ calls it with keyword arguments including
lexer="diff".

Updated the lambda function from lambda t, *_: t to lambda t, *_, **__: t
to accept both positional and keyword arguments, fixing the TypeError.

This resolves the test failure:
TypeError: assert_argument_introspection..() got an unexpected keyword argument 'lexer'

Fixes: #534

@nicoddemus nicoddemus merged commit f5aff33 into pytest-dev:main Sep 12, 2025
18 checks passed
@nicoddemus
Copy link
Member

Thanks, appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants