From b0be79c7c62edc3662910ad42f73202034b8202a Mon Sep 17 00:00:00 2001 From: tligui_y Date: Mon, 28 Jul 2025 14:39:28 +0200 Subject: [PATCH] Update tests/test_utils_logcfg.py --- tests/test_utils_logcfg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_utils_logcfg.py b/tests/test_utils_logcfg.py index f995d0f3f..a2e3e3cb2 100644 --- a/tests/test_utils_logcfg.py +++ b/tests/test_utils_logcfg.py @@ -92,7 +92,10 @@ def test_import_logging_once_per_module(): #for mod in ["json", "math", "io", "random"]: # assert stderr.count(f"importing: {mod}") == 1, f"Module '{mod}' logged multiple times or missing" - top_level_lines = [line for line in stderr.splitlines() if "test_utils_logcfg" in line] + top_level_lines = [ + line for line in stderr.splitlines() + if "importing:" in line and "logcfg.py" not in line and "site-packages" not in line + ] for mod in ["json", "math", "io", "random"]: count = sum(1 for line in top_level_lines if f"importing: {mod}" in line)