improved redaction, send system info during model config load telemetry, etc.

This commit is contained in:
Dan Saunders
2025-02-24 15:39:02 +00:00
parent 9dd1092f8f
commit 71ae6f9f87
4 changed files with 46 additions and 16 deletions

View File

@@ -1,6 +1,4 @@
"""
shared pytest fixtures
"""
"""Shared pytest fixtures"""
import functools
import importlib
@@ -559,3 +557,9 @@ def test_load_fixtures(
download_llama2_model_fixture,
):
pass
@pytest.fixture(autouse=True)
def disable_telemetry(monkeypatch):
monkeypatch.setenv("AXOLOTL_DO_NOT_TRACK", "1")
yield

View File

@@ -0,0 +1,9 @@
"""Shared pytest fixtures for telemetry tests."""
import pytest
@pytest.fixture(autouse=True)
def disable_telemetry(monkeypatch):
monkeypatch.delenv("AXOLOTL_DO_NOT_TRACK")
yield

View File

@@ -146,7 +146,7 @@ def test_is_whitelisted(manager, mock_whitelist):
def test_system_info_collection(manager):
"""Test system information collection"""
system_info = manager.system_info
system_info = manager._get_system_info()
# Check essential keys
assert "os" in system_info