Skip to content
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

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

jonathangreen
Copy link
Member

Description

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.

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

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

Copy link

codecov bot commented Jan 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5e5a17c) 89.61% compared to head (4549877) 89.61%.
Report is 5 commits behind head on main.

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     
Flag Coverage Δ
Api 75.55% <100.00%> (+<0.01%) ⬆️
Core 58.92% <25.00%> (ø)
migration 26.42% <25.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jonathangreen jonathangreen requested a review from a team January 27, 2024 01:44
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.
@jonathangreen jonathangreen force-pushed the feature/clean-up-self-tests branch from 5f92e1b to 596890a Compare January 27, 2024 03:09
@jonathangreen jonathangreen changed the title Clean up dead code in self tests Clean up dead code in self tests (PP-893) Jan 29, 2024
Copy link
Contributor

@tdilauro tdilauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥🧯

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
Copy link
Contributor

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"

@jonathangreen jonathangreen merged commit 9e1fc48 into main Jan 30, 2024
28 checks passed
@jonathangreen jonathangreen deleted the feature/clean-up-self-tests branch January 30, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants