mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Address comments
This commit is contained in:
@@ -1015,30 +1015,6 @@ def test_observability_settings_is_setup_initial(monkeypatch):
|
||||
assert settings.is_setup is False
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("enable_instrumentation", "enable_sensitive_data", "expected"),
|
||||
[
|
||||
(False, False, False),
|
||||
(True, False, True),
|
||||
(False, True, True),
|
||||
(True, True, True),
|
||||
],
|
||||
)
|
||||
def test_observability_settings_enabled_property(
|
||||
monkeypatch, enable_instrumentation: bool, enable_sensitive_data: bool, expected: bool
|
||||
):
|
||||
"""ENABLED is True when either instrumentation or sensitive data is enabled."""
|
||||
from agent_framework.observability import ObservabilitySettings
|
||||
|
||||
monkeypatch.delenv("ENABLE_INSTRUMENTATION", raising=False)
|
||||
monkeypatch.delenv("ENABLE_SENSITIVE_DATA", raising=False)
|
||||
settings = ObservabilitySettings(
|
||||
enable_instrumentation=enable_instrumentation,
|
||||
enable_sensitive_data=enable_sensitive_data,
|
||||
)
|
||||
assert settings.ENABLED is expected
|
||||
|
||||
|
||||
# region Test enable_instrumentation function
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user