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

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jul 7 17:23:46 CEST 2009


Author: seb
Date: Tue Jul  7 17:23:45 2009
New Revision: 28003

URL: http://svn.erp5.org?rev=28003&view=rev
Log:
allows to add comments inside sequence strings, works only when
steps are separated with new lines

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=28003&r1=28002&r2=28003&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/Sequence.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/Sequence.py [utf8] Tue Jul  7 17:23:45 2009
@@ -35,6 +35,7 @@
 import traceback
 import linecache
 import sys
+import re
 # Monkey patch traceback system to print how far we get in the current
 # sequence.
 # This part is adapted from python 2.4's traceback.py
@@ -142,6 +143,8 @@
 
     returns the sequence for those steps.
     """
+    # remove comments in sequence strings
+    sequence_string = re.subn("#.*\n", "\n", sequence_string)[0]
     step_list = sequence_string.split()
     return self.addSequenceStringList(step_list)
 




More information about the Erp5-report mailing list