From 876730d805bb48ac0b458f557b09f66eb0c694d5 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 5 Nov 2024 02:03:14 +0200 Subject: test: py: Fix log level restore in SimpleTestMethods() The SimpleTestMethods() function tests that incorrect calls to the Camera.acquire() method raise an exception. Before doing so, it sets the log level for the Camera category to FATAL, in order to avoid showing misleading errors in the test log, and then restores the log level to ERROR after running the test. ERROR is however not the default log level. Restore the log level to INFO instead, in order to avoid losing log messages in subsequent tests. Fixes: 06cb7130c4fa ("py: Add unittests.py") Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Tomi Valkeinen --- test/py/unittests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/py/unittests.py') diff --git a/test/py/unittests.py b/test/py/unittests.py index 1caea98e..8cb850d4 100755 --- a/test/py/unittests.py +++ b/test/py/unittests.py @@ -66,7 +66,7 @@ class SimpleTestMethods(BaseTestCase): libcam.log_set_level('Camera', 'FATAL') with self.assertRaises(RuntimeError): cam.acquire() - libcam.log_set_level('Camera', 'ERROR') + libcam.log_set_level('Camera', 'INFO') cam.release() -- cgit v1.2.1