summaryrefslogtreecommitdiff
path: root/Lib/test/test_collections.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r--Lib/test/test_collections.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 15f0bf73ed..a770155bdf 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -110,7 +110,9 @@ class TestNamedTuple(unittest.TestCase):
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)))