Author: Manuel Jacob
Branch: remove-set-smm
Changeset: r64141:a9d450829002
Date: 2013-05-15 12:04 +0200
http://bitbucket.org/pypy/pypy/changeset/a9d450829002/

Log:    Inline (temporary) wrappers in test_setobject.

diff --git a/pypy/objspace/std/test/test_setobject.py 
b/pypy/objspace/std/test/test_setobject.py
--- a/pypy/objspace/std/test/test_setobject.py
+++ b/pypy/objspace/std/test/test_setobject.py
@@ -14,16 +14,6 @@
 from pypy.objspace.std.setobject import newset
 from pypy.objspace.std.listobject import W_ListObject
 
-def and__Set_Set(space, w_left, w_right):
-    return w_left.descr_intersection(space, [w_right])
-
-def set_intersection__Set(space, w_left, w_right):
-    return w_left.descr_intersection(space, w_right)
-
-def eq__Set_Set(space, w_left, w_right):
-    return w_left.descr_eq(space, w_right)
-
-
 letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 class W_SubSetObject(W_SetObject):pass
@@ -43,11 +33,11 @@
         t0 = W_SetObject(self.space)
         _initialize_set(self.space, t0, self.otherword)
         t1 = W_FrozensetObject(self.space, self.otherword)
-        r0 = and__Set_Set(self.space, s, t0)
-        r1 = and__Set_Set(self.space, s, t1)
-        assert eq__Set_Set(self.space, r0, r1) == self.true
-        sr = set_intersection__Set(self.space, s, [self.otherword])
-        assert eq__Set_Set(self.space, r0, sr) == self.true
+        r0 = s.descr_and(self.space, t0)
+        r1 = s.descr_and(self.space, t1)
+        assert r0.descr_eq(self.space, r1) == self.true
+        sr = s.descr_intersection(self.space, [self.otherword])
+        assert r0.descr_eq(self.space, sr) == self.true
 
     def test_compare(self):
         s = W_SetObject(self.space)
@@ -73,7 +63,7 @@
         b = W_SetObject(self.space)
         _initialize_set(self.space, b, self.space.wrap("abc"))
 
-        result = set_intersection__Set(space, a, [b])
+        result = a.descr_intersection(space, [b])
         assert space.is_true(self.space.eq(result, W_SetObject(space, 
self.space.wrap("abc"))))
 
         c = W_SetObject(self.space)
@@ -87,7 +77,7 @@
         b.get_storage_copy = None
         d.get_storage_copy = None
 
-        result = set_intersection__Set(space, a, [d,c,b])
+        result = a.descr_intersection(space, [d,c,b])
         assert space.is_true(self.space.eq(result, W_SetObject(space, 
self.space.wrap(""))))
 
     def test_create_set_from_list(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to