bpo-45171: Remove tests of deprecated logger.warn(). (GH-32139)

This commit is contained in:
Jouke Witteveen 2022-03-27 20:22:05 +02:00 committed by GitHub
parent 5ca6d7469b
commit c12ba6b2ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View file

@ -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:

View file

@ -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