From: Georg Brandl Date: Fri, 18 Jul 2008 19:30:10 +0000 (+0000) Subject: #3390: replace a remaining has_key(). X-Git-Tag: v2.6b3~282 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=56af5fcab7e2ad370a1ac8985769108d281b8658;p=thirdparty%2FPython%2Fcpython.git #3390: replace a remaining has_key(). --- diff --git a/Lib/unittest.py b/Lib/unittest.py index b5c6befe90d3..b5a1a4b8b50f 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py @@ -160,7 +160,7 @@ class TestResult: return ''.join(traceback.format_exception(exctype, value, tb)) def _is_relevant_tb_level(self, tb): - return tb.tb_frame.f_globals.has_key('__unittest') + return '__unittest' in tb.tb_frame.f_globals def _count_relevant_tb_levels(self, tb): length = 0