-
Notifications
You must be signed in to change notification settings - Fork 545
test(logs): Avoid failure when running with integrations enabled #4316
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
antonpirker
merged 1 commit into
getsentry:master
from
rominf:rominf-test-logs-sentry.sdk.name
Apr 22, 2025
Merged
test(logs): Avoid failure when running with integrations enabled #4316
antonpirker
merged 1 commit into
getsentry:master
from
rominf:rominf-test-logs-sentry.sdk.name
Apr 22, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4316 +/- ##
=======================================
Coverage 80.30% 80.30%
=======================================
Files 142 142
Lines 15925 15925
Branches 2724 2724
=======================================
Hits 12789 12789
Misses 2262 2262
Partials 874 874 |
When (at least) one of integrations is enabled (because some dependencies are installed in the environment), `sentry.sdk.name` is changed from `sentry.python` to `sentry.python.[FIRST_ENABLED_INTEGRATION]` which makes `test_logs_attributes` fail. Prevent failure by relaxing the check. This change is beneficial not only for packaging (this patch was required for packaging for Fedora), but also for running tests with `pytest` directly.
1e87490
to
200ca56
Compare
antonpirker
approved these changes
Apr 22, 2025
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.
Nice! Thanks for the contribution!
rominf
added a commit
to rominf/sentry-python
that referenced
this pull request
May 14, 2025
When (at least) one of integrations is enabled (because some dependencies are installed in the environment), `sentry.sdk.name` is changed from `sentry.python` to `sentry.python.[FIRST_ENABLED_INTEGRATION]` which makes `test_logs_attributes` fail. Prevent failure by relaxing the check. This change is beneficial not only for packaging (this patch was required for packaging for Fedora), but also for running tests with `pytest` directly. See also: getsentry#4316
rominf
added a commit
to rominf/sentry-python
that referenced
this pull request
May 17, 2025
When (at least) one of integrations is enabled (because some dependencies are installed in the environment), `sentry.sdk.name` is changed from `sentry.python` to `sentry.python.[FIRST_ENABLED_INTEGRATION]` which makes `test_logs_attributes` fail. Prevent failure by relaxing the check. This change is beneficial not only for packaging (this patch was required for packaging for Fedora), but also for running tests with `pytest` directly. See also: getsentry#4316
antonpirker
pushed a commit
that referenced
this pull request
May 20, 2025
…4388) When (at least) one of integrations is enabled (because some dependencies are installed in the environment), `sentry.sdk.name` is changed from `sentry.python` to `sentry.python.[FIRST_ENABLED_INTEGRATION]` which makes `test_logs_attributes` fail. Prevent failure by relaxing the check. This change is beneficial not only for packaging (this patch was required for packaging for Fedora), but also for running tests with `pytest` directly. See also: #4316 <!-- Describe your PR here --> --- 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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When (at least) one of integrations is enabled (because some dependencies are installed in the environment),
sentry.sdk.name
is changed fromsentry.python
tosentry.python.[FIRST_ENABLED_INTEGRATION]
which makestest_logs_attributes
fail. Prevent failure by relaxing the check.This change is beneficial not only for packaging (this patch was required for packaging for Fedora), but also for running tests with
pytest
directly.Thank you for contributing to
sentry-python
! Please add tests to validate your changes, and lint your code usingtox -e linters
.Running the test suite on your PR might require maintainer approval.