From 16513d86a9ff15571182d880aea152bd5ca6d76b Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Sun, 27 Mar 2022 19:14:35 +0200 Subject: [PATCH] bpo-45171: Remove tests of deprecated logger.warn --- Lib/logging/__init__.py | 2 +- Lib/test/test_logging.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py index e8054fb1f72acb..d6315b047334ec 100644 --- a/Lib/logging/__init__.py +++ b/Lib/logging/__init__.py @@ -1568,7 +1568,7 @@ def findCaller(self, stack_info=False, stacklevel=1): while stacklevel > 0: next_f = f.f_back if next_f is None: - ##TODO: We've got options here + ## We've got options here. ## If we want to use the last (deepest) frame: break ## If we want to mimic the warnings module: diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 00e354147a27c8..f6f5977df2a1ee 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -5075,9 +5075,6 @@ def outer(): self.assertEqual(records[-1].funcName, 'outer') self.assertGreater(records[-1].lineno, lineno) lineno = records[-1].lineno - trigger = self.logger.warn - outer() - self.assertEqual(records[-1].funcName, 'outer') root_logger = logging.getLogger() root_logger.addHandler(self.recording) trigger = logging.warning