@@ -163,8 +163,11 @@ def process_outputs(self, windowed_input_element, results):
163163
164164@pytest .fixture
165165def init_beam (sentry_init ):
166- def inner (fn ):
167- sentry_init (default_integrations = False , integrations = [BeamIntegration ()])
166+ def inner (fn , send_source = False ):
167+ sentry_init (
168+ default_integrations = False ,
169+ integrations = [BeamIntegration (send_source = send_source )],
170+ )
168171 # Little hack to avoid having to run the whole pipeline.
169172 pardo = ParDo (fn )
170173 signature = pardo ._signature
@@ -176,9 +179,19 @@ def inner(fn):
176179 return inner
177180
178181
179- @pytest .mark .parametrize ("fn" , [test_simple , test_callable , test_place_holder ])
180- def test_invoker_normal (init_beam , fn ):
181- invoker = init_beam (fn )
182+ @pytest .mark .parametrize (
183+ "fn,send_source" ,
184+ [
185+ [test_simple , False ],
186+ [test_simple , True ],
187+ [test_callable , False ],
188+ [test_callable , True ],
189+ [test_place_holder , False ],
190+ [test_place_holder , True ]
191+ ],
192+ )
193+ def test_invoker_normal (init_beam , fn , send_source ):
194+ invoker = init_beam (fn , send_source )
182195 print ("Normal testing {} with {} invoker." .format (fn , invoker ))
183196 windowed_value = WindowedValue (False , 0 , [None ])
184197 invoker .invoke_process (windowed_value )
0 commit comments