diff --git a/.vscode/settings.json b/.vscode/settings.json index 2472acfd6..29abf6478 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,10 +6,13 @@ "python.testing.pytestArgs": [], "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, - "python.formatting.provider": "black", + "python.formatting.provider": "none", "python.languageServer": "Pylance", "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.organizeImports": true + }, + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter" } } \ No newline at end of file diff --git a/tests/I24/serial/test_log.py b/tests/I24/serial/test_log.py index d210d203e..dcd5633a1 100644 --- a/tests/I24/serial/test_log.py +++ b/tests/I24/serial/test_log.py @@ -1,3 +1,4 @@ +import logging from unittest.mock import patch from mx_bluesky.I24.serial import log @@ -8,3 +9,9 @@ def test_logging_file_path(mock_dir): log_path = log._get_logging_file_path() assert mock_dir.call_count == 1 assert log_path.as_posix() == "tmp/logs" + + +def test_basic_logging_config(): + logger = logging.getLogger("I24ssx") + assert logger.hasHandlers() is True + assert len(logger.handlers) == 1