| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Attributes | List of all members
GaudiTesting.BaseTest.RegexpReplacer Class Reference
Inheritance diagram for GaudiTesting.BaseTest.RegexpReplacer:
[legend]
Collaboration diagram for GaudiTesting.BaseTest.RegexpReplacer:
[legend]

## Public Member Functions
def | __init__ (self, orig, repl="", when=None)
def | __add__ (self, rhs)
def | __processLine__ (self, line)
Public Member Functions inherited from GaudiTesting.BaseTest.FilePreprocessor
def | __processFile__ (self, lines)
def | __call__ (self, input)

## Private Attributes
| _operations

## Detailed Description

Definition at line 827 of file BaseTest.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def GaudiTesting.BaseTest.RegexpReplacer.__init__ | ( |  | self,
|  |  | orig,
|  |  | repl = `""`,
|  |  | when = `None`
| ) |  |

Definition at line 828 of file BaseTest.py.

828 def __init__(self, orig, repl="", when=None):
829 if when:
830 when = re.compile(when)
831 self._operations = [(when, re.compile(orig), repl)]
832

## Member Function Documentation

## ◆ __add__()

def GaudiTesting.BaseTest.RegexpReplacer.__add__ | ( |  | self,
|  |  | rhs
| ) |  |

Reimplemented from GaudiTesting.BaseTest.FilePreprocessor.

Definition at line 833 of file BaseTest.py.

833 def __add__(self, rhs):
834 if isinstance(rhs, RegexpReplacer):
835 res = RegexpReplacer("", "", None)
836 res._operations = self._operations + rhs._operations
837 else:
838 res = FilePreprocessor.__add__(self, rhs)
839 return res
840

## ◆ __processLine__()

def GaudiTesting.BaseTest.RegexpReplacer.__processLine__ | ( |  | self,
|  |  | line
| ) |  |

Reimplemented from GaudiTesting.BaseTest.FilePreprocessor.

Definition at line 841 of file BaseTest.py.

841 def __processLine__(self, line):
842 for w, o, r in self._operations:
843 if w is None or w.search(line):
844 line = o.sub(r, line)
845 return line
846
847
848 # Common preprocessors
GaudiTesting.BaseTest.__processLine__
__processLine__
Definition: BaseTest.py:854

## Member Data Documentation

## ◆ _operations

GaudiTesting.BaseTest.RegexpReplacer._operations
| private

Definition at line 831 of file BaseTest.py.

The documentation for this class was generated from the following file:

- GaudiPolicy/python/GaudiTesting/BaseTest.py