summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2003-08-15 17:52:39 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2003-08-15 17:52:39 (GMT)
commitc8cb5d9d6950bb9e3b407c6b4a8dd2831f5edee9 (patch)
treeb484814ccf863c7d8c904e890af43dbbda609ecf /Lib/test/test_builtin.py
parent150523efa5fc1a53d64f068cd2e4444fa3ce40a3 (diff)
downloadcpython-c8cb5d9d6950bb9e3b407c6b4a8dd2831f5edee9.zip
cpython-c8cb5d9d6950bb9e3b407c6b4a8dd2831f5edee9.tar.gz
cpython-c8cb5d9d6950bb9e3b407c6b4a8dd2831f5edee9.tar.bz2
Make a copy of L before appending, so the global L remains
unchanged (and sys.gettotalrefcount() remains constant). Fix a few typos.
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r--Lib/test/test_builtin.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index 65dabb1..6521634 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),