Skip to content

Commit

Permalink
Try to fix 2.6 and pypy
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Nov 25, 2016
1 parent e26a76f commit 319ece0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/cloudpickle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def test_extended_arg(self):
nvars = 65537 + 258
names = ['g%d' % i for i in range(1, nvars)]
r = random.Random(42)
d = dict((name, r.randrange(100)) for name in names)
d = dict([(name, r.randrange(100)) for name in names])
# def f(x):
# x = g1, g2, ...
# return zlib.crc32(bytes(bytearray(x)))
Expand All @@ -351,7 +351,7 @@ def f():
x = {tup}
return zlib.crc32(bytes(bytearray(x)))
""".format(tup=', '.join(names))
exec(textwrap.dedent(code), d)
exec(textwrap.dedent(code), d, d)
f = d['f']
res = f()
data = cloudpickle.dumps([f, f])
Expand Down

0 comments on commit 319ece0

Please sign in to comment.