-
Notifications
You must be signed in to change notification settings - Fork 7
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
Clean up dead code in self tests (PP-893) #1633
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1633 +/- ##
=======================================
Coverage 89.61% 89.61%
=======================================
Files 247 247
Lines 28954 28954
Branches 6608 6608
=======================================
Hits 25946 25946
+ Misses 2025 2024 -1
- Partials 983 984 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Remove the now dead HasSelfTests class. Rename HasSelfTestsIntegrationConfiguration to HasSelfTests since it has replaced the HasSelfTests class. Roll up the BaseHasSelfTests class, since its no longer needed. Update the tests to make sure they cover the new HasSelfTests classes.
5f92e1b
to
596890a
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.
🔥🧯
tests/core/test_selftest.py
Outdated
assert setup.result.called_with_args == () | ||
assert setup.result.called_with_kwargs == dict( | ||
extra_extra_arg="foo", extra_arg="a value" | ||
) | ||
assert "a test result" == test.name | ||
|
||
# Since the HasSelfTests object no longer has an associated | ||
# ExternalIntegration, the test results are not persisted |
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.
Minor: Update comment?: "ExternalIntegration" -> "Integration"
Description
Remove the now dead
HasSelfTests
class. RenameHasSelfTestsIntegrationConfiguration
toHasSelfTests
since it has replaced theHasSelfTests
class. Roll up theBaseHasSelfTests
class, since its no longer needed.Update the tests to make sure they cover the new
HasSelfTests
classes.Motivation and Context
Now that all the self tests have been converted over to integration settings in #1627, some of the transitional code to support both integration settings and external integrations can be removed.
How Has This Been Tested?
Running tests in CI.
Checklist