FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

main: reject arguments like `pytest x.py[1]` instead of ignoring the `[]` by bluetech · Pull Request #13717 · pytest-dev/pytest · GitHub

main: reject arguments like pytest x.py[1] instead of ignoring the [] - #13717

Merged
bluetech merged 1 commit into
pytest-dev:mainfrom
bluetech:squaket
Sep 11, 2025
Merged

main: reject arguments like pytest x.py[1] instead of ignoring the []#13717
bluetech merged 1 commit into
pytest-dev:mainfrom
bluetech:squaket

Conversation

Copy link
Copy Markdown
Member

Fix #13716.

psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Sep 10, 2025
Comment thread src/_pytest/main.py
If the path doesn't exist, raise UsageError.
If the path is a directory and selection parts are present, raise UsageError.
"""
base, squacket, rest = str(arg).partition("[")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This change is unrelated, but arg is already an str, I snuck it in.

nicoddemus 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, thanks!

bluetech merged commit d2d57e3 into pytest-dev:main Sep 11, 2025
36 checks passed
bluetech deleted the squaket branch September 11, 2025 16:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

pytest x.py[param] is silently treated as pytest x.py

2 participants


Back | FazBrowse Home | New Git URL