From 72352aaa5e808f3a266ed237e150e336960b4f29 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Thu, 8 Aug 2024 13:02:08 +0100 Subject: [PATCH 1/2] Functional tests: fix `contains_ok` --- tests/functional/lib/bash/test_header | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/lib/bash/test_header b/tests/functional/lib/bash/test_header index 016b77635f0..1ac1e2cd504 100644 --- a/tests/functional/lib/bash/test_header +++ b/tests/functional/lib/bash/test_header @@ -386,7 +386,7 @@ contains_ok() { local FILE_CONTROL="${2:--}" local TEST_NAME TEST_NAME="$(basename "${FILE_TEST}")-contains-ok" - LANG=C comm -13 <(sort "${FILE_TEST}") <(sort "${FILE_CONTROL}") \ + LANG=C comm -13 <(LANG=C sort "${FILE_TEST}") <(LANG=C sort "${FILE_CONTROL}") \ 1>"${TEST_NAME}.stdout" 2>"${TEST_NAME}.stderr" if [[ -s "${TEST_NAME}.stdout" ]]; then mkdir -p "${TEST_LOG_DIR}" From 9dc786c47ca8cd4af2fc8b0da288350322ea36a1 Mon Sep 17 00:00:00 2001 From: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:14:48 +0100 Subject: [PATCH 2/2] Logging: demote "timer stopped" warnings to info level --- cylc/flow/timer.py | 2 +- tests/unit/test_timer.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cylc/flow/timer.py b/cylc/flow/timer.py index cbc4a644af6..80c68a0e696 100644 --- a/cylc/flow/timer.py +++ b/cylc/flow/timer.py @@ -52,7 +52,7 @@ def stop(self) -> None: if self.timeout is None: return self.timeout = None - LOG.warning(f"{self.name} stopped") + LOG.info(f"{self.name} stopped") def timed_out(self) -> bool: """Return whether timed out yet.""" diff --git a/tests/unit/test_timer.py b/tests/unit/test_timer.py index 3cd6704752e..d1d5abf7758 100644 --- a/tests/unit/test_timer.py +++ b/tests/unit/test_timer.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +import logging from time import sleep import pytest @@ -23,7 +24,7 @@ def test_Timer(caplog: pytest.LogCaptureFixture): """Test the Timer class.""" - caplog.set_level('WARNING') + caplog.set_level(logging.INFO) timer = Timer("bob timeout", 1.0) # timer attributes