Skip to content

Commit

Permalink
bpo-45171: Remove tests of deprecated logger.warn(). (GH-32139)
Browse files Browse the repository at this point in the history
  • Loading branch information
joukewitteveen committed Mar 27, 2022
1 parent 5ca6d74 commit c12ba6b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion Lib/logging/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions Lib/test/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c12ba6b

Please sign in to comment.