Kaydet (Commit) 0bb0299a authored tarafından Georg Brandl's avatar Georg Brandl

Take namedtuple item names only from ascii_letters (this blew up on OSX),

and make sure there are no duplicate names.
üst f899dfa1
......@@ -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)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment