Skip to content

Fix test failure with pytest 8+ and verbose mode#535

Merged
nicoddemus merged 2 commits intopytest-dev:mainfrom
cbouss:support_pytest_8_keywords_args
Sep 12, 2025
Merged

Fix test failure with pytest 8+ and verbose mode#535
nicoddemus merged 2 commits intopytest-dev:mainfrom
cbouss:support_pytest_8_keywords_args

Conversation

@cbouss
Copy link
Copy Markdown
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
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeError: assert_argument_introspection.<locals>.<lambda>() got an unexpected keyword argument 'lexer'

2 participants