-
Notifications
You must be signed in to change notification settings - Fork 741
Fix test example #19606
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
Fix test example #19606
Conversation
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 updates the test setup by replacing the legacy class-level setup and teardown methods with a pytest fixture using autouse, aligning the tests with current best practices.
- Replaced the @classmethod-based setup and teardown with a pytest fixture that uses yield for teardown.
- Removed the separate teardown_class method to streamline setup and cleanup.
Comments suppressed due to low confidence (1)
ydb/tests/example/test_example.py:17
- [nitpick] Consider renaming the fixture from 'setup_class' to a name that better reflects its usage as a pytest fixture (e.g., 'cluster_setup') to avoid confusion with the legacy setup_class pattern.
@pytest.fixture(autouse=True)
|
🟢 |
|
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Do not use setup_class -- it is a bad practice