[pypy-commit] pypy py3.6: merge default
cfbolz
pypy.commits at gmail.com
Wed Jan 8 08:06:29 EST 2020
Author: Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>
Branch: py3.6
Changeset: r98493:66a00f2388c3
Date: 2020-01-08 14:05 +0100
http://bitbucket.org/pypy/pypy/changeset/66a00f2388c3/
Log: merge default
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
@@ -541,6 +541,16 @@
assert a == []
assert b == [(True, 9)]
+ def test_groupby_crash(self):
+ # see http://bugs.python.org/issue30347
+ from itertools import groupby
+ def f(n):
+ if n == 5:
+ list(b)
+ return n != 6
+ for (k, b) in groupby(range(10), f):
+ list(b) # shouldn't crash
+
def test_iterables(self):
import itertools
diff --git a/pypy/tool/pytest/apptest2.py b/pypy/tool/pytest/apptest2.py
--- a/pypy/tool/pytest/apptest2.py
+++ b/pypy/tool/pytest/apptest2.py
@@ -46,6 +46,7 @@
if not isinstance(w_obj, pypy.interpreter.function.Function):
continue
items.append(AppTestFunction(name, self, w_obj))
+ items.sort(key=lambda item: item.reportinfo()[:2])
return items
def setup(self):
More information about the pypy-commit
mailing list