[Python-checkins] r63447 - python/trunk/Lib/test/test_collections.py
georg.brandl
python-checkins at python.org
Sun May 18 12:39:26 CEST 2008
Author: georg.brandl
Date: Sun May 18 12:39:26 2008
New Revision: 63447
Log:
Take namedtuple item names only from ascii_letters (this blew up on OSX),
and make sure there are no duplicate names.
Modified:
python/trunk/Lib/test/test_collections.py
Modified: python/trunk/Lib/test/test_collections.py
==============================================================================
--- python/trunk/Lib/test/test_collections.py (original)
+++ python/trunk/Lib/test/test_collections.py Sun May 18 12:39:26 2008
@@ -110,7 +110,9 @@
n = 10000
import string, random
- names = [''.join([random.choice(string.letters) for j in range(10)]) for i in range(n)]
+ names = list(set(''.join([random.choice(string.ascii_letters)
+ for j in range(10)]) for i in range(n)))
+ n = len(names)
Big = namedtuple('Big', names)
b = Big(*range(n))
self.assertEqual(b, tuple(range(n)))
More information about the Python-checkins
mailing list