[pypy-commit] pypy default: improve the test to show more clearly what is wrong
arigo
noreply at buildbot.pypy.org
Sun Nov 8 05:22:36 EST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r80585:fc6c84172739
Date: 2015-11-08 11:03 +0100
http://bitbucket.org/pypy/pypy/changeset/fc6c84172739/
Log: improve the test to show more clearly what is wrong
diff --git a/pypy/interpreter/test/test_zzpickle_and_slow.py b/pypy/interpreter/test/test_zzpickle_and_slow.py
--- a/pypy/interpreter/test/test_zzpickle_and_slow.py
+++ b/pypy/interpreter/test/test_zzpickle_and_slow.py
@@ -390,15 +390,20 @@
def test_pickle_enum(self):
import pickle
- e = enumerate(range(10))
+ e = enumerate(range(100, 106))
e.next()
e.next()
pckl = pickle.dumps(e)
result = pickle.loads(pckl)
- e.next()
- result.next()
+ res = e.next()
+ assert res == (2, 102)
+ res = result.next()
+ assert res == (2, 102)
assert type(e) is type(result)
- assert list(e) == list(result)
+ res = list(e)
+ assert res == [(3, 103), (4, 104), (5, 105)]
+ res = list(result)
+ assert res == [(3, 103), (4, 104), (5, 105)]
def test_pickle_xrangeiter(self):
import pickle
More information about the pypy-commit
mailing list