[Python-checkins] r53045 - python/branches/p3yk-noslice/Lib/test/test_mmap.py
thomas.wouters
python-checkins at python.org
Sat Dec 16 10:34:56 CET 2006
Author: thomas.wouters
Date: Sat Dec 16 10:34:55 2006
New Revision: 53045
Modified:
python/branches/p3yk-noslice/Lib/test/test_mmap.py
Log:
Clean up test code a bit.
Modified: python/branches/p3yk-noslice/Lib/test/test_mmap.py
==============================================================================
--- python/branches/p3yk-noslice/Lib/test/test_mmap.py (original)
+++ python/branches/p3yk-noslice/Lib/test/test_mmap.py Sat Dec 16 10:34:55 2006
@@ -308,7 +308,7 @@
def test_extended_getslice(self):
# Test extended slicing by comparing with list slicing.
- s = "".join(chr(c) for c in list(range(255, -1, -1)))
+ s = "".join(chr(c) for c in reversed(range(256)))
m = mmap.mmap(-1, len(s))
m[:] = s
self.assertEqual(m[:], s)
@@ -322,7 +322,7 @@
def test_extended_set_del_slice(self):
# Test extended slicing by comparing with list slicing.
- s = "".join(chr(c) for c in list(range(255, -1, -1)))
+ s = "".join(chr(c) for c in reversed(range(256)))
m = mmap.mmap(-1, len(s))
indices = (0, None, 1, 3, 19, 300, -1, -2, -31, -300)
for start in indices:
More information about the Python-checkins
mailing list