| The Gaudi Framework v32r1 (f65d50dc)

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

## Public Member Functions
def | __init__ (self, exp)
def | __processFile__ (self, lines)
Public Member Functions inherited from GaudiTesting.BaseTest.FilePreprocessor
def | __processLine__ (self, line)
def | __call__ (self, input)
def | __add__ (self, rhs)

## Public Attributes
| exp

## Detailed Description

    Sort group of lines matching a regular expression

Definition at line 879 of file BaseTest.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def GaudiTesting.BaseTest.SortGroupOfLines.__init__ | ( |  | self,
|  |  | exp
| ) |  |

Definition at line 884 of file BaseTest.py.

884 def __init__(self, exp):
885 self.exp = exp if hasattr(exp, 'match') else re.compile(exp)
886

## Member Function Documentation

## ◆ __processFile__()

def GaudiTesting.BaseTest.SortGroupOfLines.__processFile__ | ( |  | self,
|  |  | lines
| ) |  |

Reimplemented from GaudiTesting.BaseTest.FilePreprocessor.

Definition at line 887 of file BaseTest.py.

887 def __processFile__(self, lines):
888 match = self.exp.match
889 output = []
890 group = []
891 for l in lines:
892 if match(l):
893 group.append(l)
894 else:
895 if group:
896 group.sort()
897 output.extend(group)
898 group = []
899 output.append(l)
900 return output
901
902
903 # Preprocessors for GaudiExamples

## Member Data Documentation

## ◆ exp

GaudiTesting.BaseTest.SortGroupOfLines.exp

Definition at line 885 of file BaseTest.py.

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

- GaudiPolicy/python/GaudiTesting/BaseTest.py