Skip to content

Reject negative --order-scope-level values - #284

Open
mk78 wants to merge 1 commit into
pytest-dev:mainfrom
mk78:mk78-fix-pytest-order-small-bug
Open

mk78 wants to merge 1 commit into
pytest-dev:mainfrom
mk78:mk78-fix-pytest-order-small-bug

Conversation

@mk78

@mk78 mk78 commented Dec 3, 2026

Copy link
Copy Markdown

Summary

Reject negative values for --order-scope-level during argument parsing.

Previously, negative values were accepted and interpreted through Python slicing, resulting in unintended directory scope behavior.

The option now produces a clear pytest usage error for negative values while preserving valid non-negative levels.

Tests

  • Focused scope-level tests: passed
  • Full suite: 180 passed
  • Pre-commit checks: passed

Fixes the negative scope-level validation defect.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant