-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
test(backup): Ensure coverage of all exportable models #53295
Conversation
073e863
to
25906ad
Compare
5c09cc8
to
1e07fda
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #53295 +/- ##
==========================================
- Coverage 79.55% 79.52% -0.03%
==========================================
Files 4942 4939 -3
Lines 208542 208076 -466
Branches 35525 35479 -46
==========================================
- Hits 165903 165478 -425
+ Misses 37586 37560 -26
+ Partials 5053 5038 -15 |
1e07fda
to
6a518ba
Compare
efdb281
to
dc8dfc1
Compare
dc8dfc1
to
162371c
Compare
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.
Approved with minor docstring suggestion.
The basic idea here is to include a test that finds all non-abstract descendants of our `BaseModel`, filter down to just the exportable ones (ie, those that set `__include_in_export__ = True`), and then ensure that each of them is included in at least one of the tests seen in `test_models.py`. This is done by introducing a new `mark` wrapper class which ingests all of the "target" models used by the `@targets` test decorator at init time, allowing us to create an exhaustive list of all types passed to `@targets`. Issue: getsentry/team-ospo#156
162371c
to
c057e81
Compare
The basic idea here is to include a test that finds all non-abstract descendants of our `BaseModel`, filter down to just the exportable ones (ie, those that set `__include_in_export__ = True`), and then ensure that each of them is included in at least one of the tests seen in `test_models.py`. This is done by introducing a new `mark` wrapper class which ingests all of the "target" models used by the `@targets` test decorator at init time, allowing us to create an exhaustive list of all types passed to `@targets`. Issue: getsentry/team-ospo#156
The basic idea here is to include a test that finds all non-abstract descendants of our
BaseModel
, filter down to just the exportable ones (ie, those that set__include_in_export__ = True
), and then ensure that each of them is included in at least one of the tests seen intest_models.py
. This is done by introducing a newmark
wrapper class which ingests all of the "target" models used by the@targets
test decorator at init time, allowing us to create an exhaustive list of all types passed to@targets
.Issue: getsentry/team-ospo#156