From: Walter Dörwald Date: Fri, 15 Aug 2003 17:36:25 +0000 (+0000) Subject: Backport checkin: X-Git-Tag: v2.3.1~147 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=33f6aebeeded1177c11a200e9714dfa763c4d8f0;p=thirdparty%2FPython%2Fcpython.git Backport checkin: Make a copy of L before appending, so the global L remains unchanged (and sys.gettotalrefcount() remains constant). Fix a few typos. --- diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 3dd2ffc7f312..b7b8afb248da 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -364,9 +364,9 @@ class BuiltinTest(unittest.TestCase): ) def test_filter_subclasses(self): - # test, that filter() never returns tuple, str or unicode subclasses - # and that the result always go's through __getitem__ - funcs = (None, lambda x: True) + # test that filter() never returns tuple, str or unicode subclasses + # and that the result always goes through __getitem__ + funcs = (None, bool, lambda x: True) class tuple2(tuple): def __getitem__(self, index): return 2*tuple.__getitem__(self, index) @@ -630,7 +630,7 @@ class BuiltinTest(unittest.TestCase): ('1' + '0'*20, 10L**20), ('1' + '0'*100, 10L**100) ] - L2 = L + L2 = L[:] if have_unicode: L2 += [ (unicode('1') + unicode('0')*20, 10L**20),