[pypy-commit] pypy set-strategies: added listview tests for listobject
l.diekmann
noreply at buildbot.pypy.org
Wed Jan 11 14:50:34 CET 2012
Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: set-strategies
Changeset: r51226:243af83be4d9
Date: 2012-01-11 14:49 +0100
http://bitbucket.org/pypy/pypy/changeset/243af83be4d9/
Log: added listview tests for listobject
diff --git a/pypy/objspace/std/test/test_liststrategies.py b/pypy/objspace/std/test/test_liststrategies.py
--- a/pypy/objspace/std/test/test_liststrategies.py
+++ b/pypy/objspace/std/test/test_liststrategies.py
@@ -491,6 +491,16 @@
assert space.eq_w(w_l, w_l2)
+ def test_listview_str_list(self):
+ space = self.space
+ w_l = W_ListObject(space, [space.wrap("a"), space.wrap("b")])
+ assert self.space.listview_str(w_l) == ["a", "b"]
+
+ def test_listview_int_list(self):
+ space = self.space
+ w_l = W_ListObject(space, [space.wrap(1), space.wrap(2), space.wrap(3)])
+ assert self.space.listview_int(w_l) == [1, 2, 3]
+
class TestW_ListStrategiesDisabled:
def setup_class(cls):
More information about the pypy-commit
mailing list