@@ -48,29 +48,25 @@ def test_start_sentry_listener(create_spark_context):
4848 assert gateway ._callback_server is not None
4949
5050
51- def test_initialize_spark_integration (
52- sentry_init , create_spark_context , reset_integrations
53- ):
51+ def test_initialize_spark_integration (sentry_init , create_spark_context ):
5452 sentry_init (integrations = [SparkIntegration ()])
5553 create_spark_context ()
5654
5755
58- @patch ("sentry_sdk.integrations.spark.spark_driver._patch_spark_context_init " )
56+ @patch ("sentry_sdk.integrations.spark.spark_driver._activate_integration " )
5957def test_initialize_spark_integration_before_spark_context_init (
60- mock_patch_spark_context_init ,
58+ mock_activate_integration ,
6159 sentry_init ,
6260 create_spark_context ,
6361):
6462 sentry_init (integrations = [SparkIntegration ()])
6563 create_spark_context ()
6664
67- mock_patch_spark_context_init .assert_called_once ()
65+ mock_activate_integration .assert_called_once ()
6866
6967
7068@patch ("sentry_sdk.integrations.spark.spark_driver._activate_integration" )
71- @patch ("sentry_sdk.integrations.spark.spark_driver._patch_spark_context_init" )
7269def test_initialize_spark_integration_after_spark_context_init (
73- mock_patch_spark_context_init ,
7470 mock_activate_integration ,
7571 create_spark_context ,
7672 sentry_init ,
@@ -79,7 +75,6 @@ def test_initialize_spark_integration_after_spark_context_init(
7975 sentry_init (integrations = [SparkIntegration ()])
8076
8177 mock_activate_integration .assert_called_once ()
82- mock_patch_spark_context_init .assert_not_called ()
8378
8479
8580@pytest .fixture
0 commit comments