Skip to content

test: Remove test_installed_modules #4593

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

Merged

Conversation

szokeasaurusrex
Copy link
Member

The test test_installed_modules appears to not be all that useful.

The test exists to verify the behavior of the _generate_installed_modules function. However, all the test does is essentially check the output of _generate_installed_modules against a refactored version of the function call itself.

In short, in its current form, the test appears to not make too much sense. As the test recently started failing, let's just delete it.


Thank you for contributing to sentry-python! Please add tests to validate your changes, and lint your code using tox -e linters.

Running the test suite on your PR might require maintainer approval.

The test `test_installed_modules` appears to not be all that useful.

The test exists to verify the behavior of the [`_generate_installed_modules` function](https://github.com/getsentry/sentry-python/blob/9b66f3b51502ca600554c711bc3f599c18f8f18b/sentry_sdk/utils.py#L1689). However, all the test does is essentially check the output of `_generate_installed_modules` against a refactored version of the function call itself.

In short, in its current form, the test appears to not make too much sense. As the test recently started failing, let's just delete it.
@szokeasaurusrex szokeasaurusrex requested a review from a team as a code owner July 17, 2025 13:56
Copy link

codecov bot commented Jul 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.68%. Comparing base (9b66f3b) to head (8335301).
Report is 3 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4593      +/-   ##
==========================================
- Coverage   80.72%   80.68%   -0.04%     
==========================================
  Files         156      156              
  Lines       16507    16507              
  Branches     2806     2806              
==========================================
- Hits        13325    13319       -6     
- Misses       2295     2298       +3     
- Partials      887      890       +3     

see 4 files with indirect coverage changes

@sl0thentr0py
Copy link
Member

gevent flaky test will be fixed in #4590

@szokeasaurusrex szokeasaurusrex merged commit 89e624a into master Jul 17, 2025
155 of 158 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/remove-test_installed_modules branch July 17, 2025 14:13
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