[Erp5-report] r18792 - /erp5/trunk/products/ERP5Type/tests/Sequence.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jan 18 14:55:24 CET 2008


Author: jerome
Date: Fri Jan 18 14:55:24 2008
New Revision: 18792

URL: http://svn.erp5.org?rev=18792&view=rev
Log:
returns the new sequence in addSequenceString and addSequenceStringList

Modified:
    erp5/trunk/products/ERP5Type/tests/Sequence.py

Modified: erp5/trunk/products/ERP5Type/tests/Sequence.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/Sequence.py?rev=18792&r1=18791&r2=18792&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/Sequence.py (original)
+++ erp5/trunk/products/ERP5Type/tests/Sequence.py Fri Jan 18 14:55:24 2008
@@ -136,18 +136,20 @@
   def __init__(self):
     self._sequence_list = []
 
-  def addSequence(self,sequence):
+  def addSequence(self, sequence):
     self._sequence_list.append(sequence)
 
-  def addSequenceString(self,sequence_string):
+  def addSequenceString(self, sequence_string):
     """
     The sequence string should be a string of method names
     separated by spaces or \n
+
+    returns the sequence for those steps.
     """
     step_list = sequence_string.split()
-    self.addSequenceStringList(step_list)
+    return self.addSequenceStringList(step_list)
 
-  def addSequenceStringList(self,step_list):
+  def addSequenceStringList(self, step_list):
     step_list
     sequence = Sequence()
     for step in step_list:
@@ -156,6 +158,7 @@
           step = step[4:]
         sequence.addStep(step)
     self.addSequence(sequence)
+    return sequence
 
   def play(self, context, quiet=0):
     i = 1




More information about the Erp5-report mailing list