Definition at line 93 of file preprocessors.py.
◆ __init__()
| GaudiTesting.preprocessors.RegexpReplacer.__init__ |
( |
| self, |
|
|
| orig, |
|
|
| repl = "", |
|
|
| when = None ) |
Definition at line 94 of file preprocessors.py.
94 def __init__(self, orig, repl="", when=None):
95 if when:
96 when = re.compile(when)
97 self._operations = [(when, re.compile(orig), repl)]
98
◆ __add__()
| GaudiTesting.preprocessors.RegexpReplacer.__add__ |
( |
| self, |
|
|
| rhs ) |
Definition at line 99 of file preprocessors.py.
99 def __add__(self, rhs):
100 if isinstance(rhs, RegexpReplacer):
101 res = RegexpReplacer("", "", None)
102 res._operations = self._operations + rhs._operations
103 else:
104 res = FilePreprocessor.__add__(self, rhs)
105 return res
106
◆ __processLine__()
| GaudiTesting.preprocessors.RegexpReplacer.__processLine__ |
( |
| self, |
|
|
| line ) |
Definition at line 107 of file preprocessors.py.
107 def __processLine__(self, line):
108 for w, o, r in self._operations:
109 if w is None or w.search(line):
110 line = o.sub(r, line)
111 return line
112
113
114
◆ _operations
| list GaudiTesting.preprocessors.RegexpReplacer._operations = [(when, re.compile(orig), repl)] |
|
protected |
The documentation for this class was generated from the following file: