Skip to content

Unify unknown-mark error and warning messages - #15450

Open
The-Compiler wants to merge 1 commit into
pytest-dev:mainfrom
The-Compiler:unify-unknown-mark-messages
Open

The-Compiler wants to merge 1 commit into
pytest-dev:mainfrom
The-Compiler:unify-unknown-mark-messages

Conversation

@The-Compiler

Copy link
Copy Markdown
Member

With strict_markers enabled, an unregistered mark failed with "'name' not found in markers configuration option", while the non-strict path warned with a longer text that explained how to register custom marks and linked to the docs.

The warning was added in #4935 next to the already existing strict error, and #5178 later reworded that error without picking up the docs link, so the two messages drifted apart.

Build a single message and use it for both the failure and the warning, so the strict error now carries the documentation link too.

🤖 Done with Claude Fable 5.1 with my guidance, based on feedback I got during my pytest training

With strict_markers enabled, an unregistered mark failed with
"'name' not found in `markers` configuration option", while the
non-strict path warned with a longer text that explained how to
register custom marks and linked to the docs.

The warning was added in pytest-dev#4935 next to the already existing strict
error, and pytest-dev#5178 later reworded that error without picking up the
docs link, so the two messages drifted apart.

Build a single message and use it for both the failure and the
warning, so the strict error now carries the documentation link too.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Nov 24, 2026

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lovely

This branch has not been deployed

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

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants