From 2b5a4e76bdd1123cb1a10a97d1114f9ce57338e5 Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Tue, 7 Jul 2009 15:23:45 +0000 Subject: [PATCH] allows to add comments inside sequence strings, works only when steps are separated with new lines git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28003 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/tests/Sequence.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/product/ERP5Type/tests/Sequence.py b/product/ERP5Type/tests/Sequence.py index 15cff3a259..f5e7077d8f 100644 --- a/product/ERP5Type/tests/Sequence.py +++ b/product/ERP5Type/tests/Sequence.py @@ -35,6 +35,7 @@ import random 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 @@ class SequenceList: 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) -- 2.30.9