Skip to content

test: Assert traces_sampler called once #4450

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

Open
wants to merge 1 commit into
base: potel-base
Choose a base branch
from

Conversation

szokeasaurusrex
Copy link
Member

Currently, this test only asserts that the traces_sampler is called at least once with the given arguments. However, we would expect it to be called exactly once.

This PR changes the assertion to assert that the traces_sampler was called exactly one time, and that that call included the given arguments.


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.

Currently, this test only asserts that the `traces_sampler` is called at least once with the given arguments. However, we would expect it to be called exactly once.

This PR changes the assertion to assert that the `traces_sampler` was called exactly one time, and that that call included the given arguments.
@szokeasaurusrex szokeasaurusrex requested a review from a team as a code owner June 6, 2025 12:00
Copy link

codecov bot commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.79%. Comparing base (cfbb8db) to head (bbc7605).
Report is 2 commits behind head on potel-base.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@              Coverage Diff               @@
##           potel-base    #4450      +/-   ##
==============================================
- Coverage       84.80%   84.79%   -0.02%     
==============================================
  Files             144      144              
  Lines           14725    14728       +3     
  Branches         2343     2343              
==============================================
  Hits            12488    12488              
  Misses           1523     1523              
- Partials          714      717       +3     

see 4 files with indirect coverage changes

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