-
Notifications
You must be signed in to change notification settings - Fork 14
Add two new decorators to replace the force skip option #6091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
bbdc33c to
a02db23
Compare
|
cbeauchesne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you write some test?
By reading your code, I think it does not do what we expect (skip if it's annotated with flaky/bug/missing_feature), but inconditionally skip the test.
a02db23 to
2bf4a05
Compare
2bf4a05 to
5926ec2
Compare
2615cc5 to
4e08f0c
Compare
cbeauchesne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces two new decorators (@slow and @scenario_crash) that replace the force_skip option in existing decorators like @bug and @missing_feature. These decorators leverage pytest's skip_if_xfail marker to conditionally skip tests only when combined with a declaration marker (bug, missing_feature, etc.).
Changes:
- Added
@slowand@scenario_crashdecorators as aliases topytest.mark.skip_if_xfail - Updated conftest.py to skip tests that have both
skip_if_xfailanddeclarationmarkers - Added comprehensive test coverage for the new decorators
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/_decorators.py | Defines the new slow and scenario_crash decorators |
| utils/init.py | Exports the new decorators in the public API |
| tests/test_the_test/test_slow_and_crash_decorators.py | Comprehensive test suite validating decorator behavior |
| pyproject.toml | Registers the new skip_if_xfail pytest marker |
| conftest.py | Implements skip logic for tests with both markers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Motivation
Changes
Workflow
🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
tests/ormanifests/is modified ? I have the approval from R&P teambuild-XXX-imagelabel is present