Skip to content

Commit 9844ccb

Browse files
Reformatting
1 parent c5f4122 commit 9844ccb

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

tests/observability/core/test_agent365.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,18 @@ def test_configure_uses_existing_tracer_provider(self, mock_get_provider, mock_i
201201
self.assertIn("_EnrichingBatchSpanProcessor", processor_types)
202202
self.assertIn("SpanProcessor", processor_types)
203203

204+
204205
class TestOTLPExporterConfiguration(unittest.TestCase):
205206
"""Test suite for OTLP exporter configuration based on environment variables."""
206207

207208
@patch("microsoft_agents_a365.observability.core.config.OTLPSpanExporter")
208-
@patch("microsoft_agents_a365.observability.core.config.is_agent365_exporter_enabled", return_value=False)
209+
@patch(
210+
"microsoft_agents_a365.observability.core.config.is_agent365_exporter_enabled",
211+
return_value=False,
212+
)
209213
@patch("microsoft_agents_a365.observability.core.config.TelemetryManager._instance", None)
210214
@patch.dict("os.environ", {"OTEL_EXPORTER_OTLP_ENDPOINT": "http://localhost:4318"}, clear=True)
211-
def test_otlp_exporter_initialized_when_env_var_set(
212-
self, mock_is_enabled, mock_otlp_exporter
213-
):
215+
def test_otlp_exporter_initialized_when_env_var_set(self, mock_is_enabled, mock_otlp_exporter):
214216
"""Test that OTLPSpanExporter is initialized when OTEL_EXPORTER_OTLP_ENDPOINT is set."""
215217

216218
result = configure(
@@ -222,7 +224,10 @@ def test_otlp_exporter_initialized_when_env_var_set(
222224
mock_otlp_exporter.assert_called_once()
223225

224226
@patch("microsoft_agents_a365.observability.core.config.OTLPSpanExporter")
225-
@patch("microsoft_agents_a365.observability.core.config.is_agent365_exporter_enabled", return_value=False)
227+
@patch(
228+
"microsoft_agents_a365.observability.core.config.is_agent365_exporter_enabled",
229+
return_value=False,
230+
)
226231
@patch("microsoft_agents_a365.observability.core.config.TelemetryManager._instance", None)
227232
@patch.dict("os.environ", {}, clear=True)
228233
def test_otlp_exporter_not_initialized_when_env_var_not_set(
@@ -238,5 +243,6 @@ def test_otlp_exporter_not_initialized_when_env_var_not_set(
238243
self.assertTrue(result, "configure() should return True")
239244
mock_otlp_exporter.assert_not_called()
240245

246+
241247
if __name__ == "__main__":
242248
unittest.main()

0 commit comments

Comments
 (0)