[rset] cubes such as iliane hi-jack rset description by poping some lines from it. Handle this on RepeatList
--- a/test/unittest_utils.py Tue Mar 30 11:18:31 2010 +0200
+++ b/test/unittest_utils.py Tue Mar 30 13:27:30 2010 +0200
@@ -78,6 +78,14 @@
x = l + [(1, 3)] * 2
self.assertEquals(x, [(1, 3)] * 5)
+ def test_eq(self):
+ self.assertEquals(RepeatList(3, (1, 3)),
+ [(1, 3)]*3)
+
+ def test_pop(self):
+ l = RepeatList(3, (1, 3))
+ l.pop(2)
+ self.assertEquals(l, [(1, 3)]*2)
class SizeConstrainedListTC(TestCase):
--- a/utils.py Tue Mar 30 11:18:31 2010 +0200
+++ b/utils.py Tue Mar 30 13:27:30 2010 +0200
@@ -135,7 +135,8 @@
if isinstance(other, RepeatList):
return other._size == self.size and other._item == self.item
return self[:] == other
-
+ def pop(self, i):
+ self._size -= 1
class UStringIO(list):
"""a file wrapper which automatically encode unicode string to an encoding