From d8ea8c3033e574b9fd44e05f93f6dd0ea3845e9a Mon Sep 17 00:00:00 2001 From: iburakov Date: Sat, 26 Aug 2023 22:10:53 +0000 Subject: [PATCH] Fix unwanted logs weren't silenced during tests Logger levels weren't initialized at import time, so recently introduced checks of them weren't working right. Using pytest hooks to defer them. --- ml/synthesis/src/tests/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ml/synthesis/src/tests/conftest.py b/ml/synthesis/src/tests/conftest.py index a9e87ff81..f4ffd9d3b 100644 --- a/ml/synthesis/src/tests/conftest.py +++ b/ml/synthesis/src/tests/conftest.py @@ -8,4 +8,6 @@ test_root_dict, ) -silence_unwanted_logs() + +def pytest_sessionstart(session): + silence_unwanted_logs()