From 9b873ba61e337c127471c66ae417b09891eb9b20 Mon Sep 17 00:00:00 2001 From: elad-c Date: Mon, 27 Jan 2025 17:22:40 +0200 Subject: [PATCH] fix test --- tests/common_tests/function_tests/test_logger.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/common_tests/function_tests/test_logger.py b/tests/common_tests/function_tests/test_logger.py index be69c7c3a..c01770fa8 100644 --- a/tests/common_tests/function_tests/test_logger.py +++ b/tests/common_tests/function_tests/test_logger.py @@ -82,18 +82,14 @@ def test_debug(self, mock_get_logger): def test_info(self, mock_get_logger): logger_mock = MagicMock() mock_get_logger.return_value = logger_mock - with patch('sys.stdout', new=StringIO()) as fake_out: - Logger.info(self.log_message) - self.assertEqual(fake_out.getvalue().strip(), self.log_message) + Logger.info(self.log_message) logger_mock.info.assert_called_once_with(self.log_message) @patch('model_compression_toolkit.logger.Logger.get_logger') def test_warning(self, mock_get_logger): logger_mock = MagicMock() mock_get_logger.return_value = logger_mock - with patch('sys.stdout', new=StringIO()) as fake_out: - Logger.warning(self.log_message) - self.assertEqual(fake_out.getvalue().strip(), self.log_message) + Logger.warning(self.log_message) logger_mock.warning.assert_called_once_with(self.log_message) @patch('model_compression_toolkit.logger.Logger.get_logger')