]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45171: Remove tests of deprecated logger.warn(). (GH-32139)
authorJouke Witteveen <j.witteveen@gmail.com>
Sun, 27 Mar 2022 18:22:05 +0000 (20:22 +0200)
committerGitHub <noreply@github.com>
Sun, 27 Mar 2022 18:22:05 +0000 (19:22 +0100)
Lib/logging/__init__.py
Lib/test/test_logging.py

index e8054fb1f72acb9dd10fe380ea05b9f9a41f4098..d6315b047334ec974f7b2fdb469f0cfebb788312 100644 (file)
@@ -1568,7 +1568,7 @@ class Logger(Filterer):
         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:
index 00e354147a27c844eb98429f0e5d52dfdbbefebc..f6f5977df2a1ee5d4ba131e8ac61166bc8948dc0 100644 (file)
@@ -5075,9 +5075,6 @@ class LoggerTest(BaseTest, AssertErrorMessage):
         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