summaryrefslogtreecommitdiffstats
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 ad8c230..4ed0e24 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -114,7 +114,9 @@ class TestNamedTuple(unittest.TestCase):
# n = 10000
n = 254 # SyntaxError: more than 255 arguments:
import string, random
- names = [''.join([random.choice(string.ascii_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)))