diff --git a/pylint/testutils/configuration_test.py b/pylint/testutils/configuration_test.py index 3bb63bf29c0..2ff8ae0f224 100644 --- a/pylint/testutils/configuration_test.py +++ b/pylint/testutils/configuration_test.py @@ -31,6 +31,9 @@ def get_path_according_to_suffix() -> Path: if expected_result_path.exists(): with open(expected_result_path, encoding="utf8") as f: expected = f.read() + # logging is helpful to to realize your file is not taken into + # account after a misspell of the file name. The output of the + # program is checked during the test so printing messes with the result. logging.info("%s exists.", expected_result_path) else: logging.info("%s not found, using '%s'.", expected_result_path, default) @@ -76,6 +79,9 @@ def get_relative_path(path: str) -> str: output = get_expected_or_default(configuration_path, suffix="out", default="") if output: + # logging is helpful to see what the expected exit code is and why. + # The output of the program is checked during the test so printing + # messes with the result. logging.info( "Output exists for %s so the expected exit code is 2", configuration_path ) diff --git a/tests/config/test_functional_config_loading.py b/tests/config/test_functional_config_loading.py index 437ae50faff..48abe8191b8 100644 --- a/tests/config/test_functional_config_loading.py +++ b/tests/config/test_functional_config_loading.py @@ -67,6 +67,8 @@ def test_functional_config_loading( caplog: LogCaptureFixture, ): """Functional tests for configurations.""" + # logging is helpful to see what's expected and why. The output of the + # program is checked during the test so printing messes with the result. caplog.set_level(logging.INFO) configuration_path = str(FUNCTIONAL_DIR / configuration_path) msg = f"Wrong result with configuration {configuration_path}"