@@ -137,21 +137,6 @@ def test_prefers_traces_sampler_to_traces_sample_rate(
137137 assert transaction .sampled is traces_sampler_return_value
138138
139139
140- @pytest .mark .parametrize ("parent_sampling_decision" , [True , False ])
141- def test_ignores_inherited_sample_decision_when_traces_sampler_defined (
142- sentry_init , parent_sampling_decision
143- ):
144- # make traces_sampler pick the opposite of the inherited decision, to prove
145- # that traces_sampler takes precedence
146- traces_sampler = mock .Mock (return_value = not parent_sampling_decision )
147- sentry_init (traces_sampler = traces_sampler )
148-
149- transaction = start_transaction (
150- name = "dogpark" , parent_sampled = parent_sampling_decision
151- )
152- assert transaction .sampled is not parent_sampling_decision
153-
154-
155140@pytest .mark .parametrize ("explicit_decision" , [True , False ])
156141def test_traces_sampler_doesnt_overwrite_explicitly_passed_sampling_decision (
157142 sentry_init , explicit_decision
@@ -165,21 +150,6 @@ def test_traces_sampler_doesnt_overwrite_explicitly_passed_sampling_decision(
165150 assert transaction .sampled is explicit_decision
166151
167152
168- @pytest .mark .parametrize ("parent_sampling_decision" , [True , False ])
169- def test_inherits_parent_sampling_decision_when_traces_sampler_undefined (
170- sentry_init , parent_sampling_decision
171- ):
172- # make sure the parent sampling decision is the opposite of what
173- # traces_sample_rate would produce, to prove the inheritance takes
174- # precedence
175- sentry_init (traces_sample_rate = 0.5 )
176- mock_random_value = 0.25 if parent_sampling_decision is False else 0.75
177-
178- with mock .patch .object (random , "random" , return_value = mock_random_value ):
179- span = start_span (name = "dogpark" , parent_sampled = parent_sampling_decision )
180- assert span .sampled is parent_sampling_decision
181-
182-
183153@pytest .mark .parametrize ("parent_sampling_decision" , [True , False ])
184154def test_passes_parent_sampling_decision_in_sampling_context (
185155 sentry_init , parent_sampling_decision
0 commit comments