[pypy-commit] pypy py3k: merge
dusty
noreply at buildbot.pypy.org
Tue Mar 13 21:31:38 CET 2012
Author: Dusty Phillips <dusty at buchuki.com>
Branch: py3k
Changeset: r53481:5f31cfe20a25
Date: 2012-03-13 12:00 -0700
http://bitbucket.org/pypy/pypy/changeset/5f31cfe20a25/
Log: merge
diff --git a/pypy/interpreter/test/test_interpreter.py b/pypy/interpreter/test/test_interpreter.py
--- a/pypy/interpreter/test/test_interpreter.py
+++ b/pypy/interpreter/test/test_interpreter.py
@@ -183,14 +183,10 @@
r = [
f(n, *[]),
f(n),
- apply(f, (n,)),
- apply(f, [n]),
f(*(n,)),
f(*[n]),
f(n=n),
f(**{'n': n}),
- apply(f, (n,), {}),
- apply(f, [n], {}),
f(*(n,), **{}),
f(*[n], **{}),
f(n, **{}),
@@ -203,7 +199,7 @@
]
return r
'''
- assert self.codetest(code, 'f38', [117]) == [234]*19
+ assert self.codetest(code, 'f38', [117]) == [234]*15
def test_star_arg(self):
code = '''
diff --git a/pypy/interpreter/test/test_nestedscope.py b/pypy/interpreter/test/test_nestedscope.py
--- a/pypy/interpreter/test/test_nestedscope.py
+++ b/pypy/interpreter/test/test_nestedscope.py
@@ -57,7 +57,7 @@
assert keys == ['h', 'x']
def test_lambda_in_genexpr(self):
- assert eval('map(apply, (lambda: t for t in range(10)))') == list(range(10))
+ assert [x() for x in (lambda: x for x in range(10))] == list(range(10))
def test_cell_contents(self):
def f(x):
diff --git a/pypy/module/itertools/test/test_itertools.py b/pypy/module/itertools/test/test_itertools.py
--- a/pypy/module/itertools/test/test_itertools.py
+++ b/pypy/module/itertools/test/test_itertools.py
@@ -223,9 +223,9 @@
assert list(itertools.islice(range(100), 10, 3)) == []
# new in 2.5: start=None or step=None
- assert list(itertools.islice(range(10), None)) == range(10)
- assert list(itertools.islice(range(10), None,None)) == range(10)
- assert list(itertools.islice(range(10), None,None,None)) == range(10)
+ assert list(itertools.islice(range(10), None)) == list(range(10))
+ assert list(itertools.islice(range(10), None,None)) == list(range(10))
+ assert list(itertools.islice(range(10), None,None,None)) == list(range(10))
def test_islice_dropitems_exact(self):
import itertools
@@ -758,7 +758,7 @@
self.e = e
def __iter__(self): # its iterator is itself
return self
- def next(self):
+ def __next__(self):
if self.t > 0:
self.t -= 1
return self.o
@@ -949,7 +949,7 @@
self.e = e
def __iter__(self): # its iterator is itself
return self
- def next(self):
+ def __next__(self):
if self.t > 0:
self.t -= 1
return self.o
More information about the pypy-commit
mailing list