-
Notifications
You must be signed in to change notification settings - Fork 465
test: move pytestmark to module level for migration test module #6387
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
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.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on December 10
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6387 +/- ##
=======================================
Coverage 98.02% 98.02%
=======================================
Files 1282 1282
Lines 45498 45498
=======================================
+ Hits 44600 44601 +1
+ Misses 898 897 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
khvn26
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.
Is it safe to assume all migration tests use the migrator fixture? In that case, consider redefining it in the root conftest.py module like so:
def migrator(request: pytest.FixtureRequest) -> Migrator:
if settings.SKIP_MIGRATION_TESTS:
pytest.skip("reason...")
return request.getfixturevalue("migrator")
Nice idea! |
khvn26
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.

Changes
Factors out the
SKIP_MIGRATION_TESTSlogic into a custommigratorfixture. This PR is being introduced because one of the tests in thetests/unit/features/test_migrations.pyfile didn't have the pytest mark decorator. This change also prevents this from occurring again when adding new migration tests.I've also included some bonus removals of
type: ignorestatements since I was working in the area.How did you test this code?
Ran the following 2 example test commands and verified that the tests were / weren't skipped when I expected.