The Gaudi Framework  v41r0 (bdbe7744)
Loading...
Searching...
No Matches
GaudiTesting.preprocessors.FilePreprocessor Class Reference
Inheritance diagram for GaudiTesting.preprocessors.FilePreprocessor:

Public Member Functions

 __processLine__ (self, line)
 __processFile__ (self, lines)
 __call__ (self, input)
 __add__ (self, rhs)

Detailed Description

Base class for a callable that takes a file and returns a modified
version of it.

Definition at line 14 of file preprocessors.py.

Member Function Documentation

◆ __add__()

GaudiTesting.preprocessors.FilePreprocessor.__add__ ( self,
rhs )

Definition at line 41 of file preprocessors.py.

41 def __add__(self, rhs):
42 return FilePreprocessorSequence([self, rhs])
43
44

◆ __call__()

GaudiTesting.preprocessors.FilePreprocessor.__call__ ( self,
input )

Definition at line 29 of file preprocessors.py.

29 def __call__(self, input):
30 if not isinstance(input, str):
31 lines = input
32 mergeback = False
33 else:
34 lines = input.splitlines()
35 mergeback = True
36 output = self.__processFile__(lines)
37 if mergeback:
38 output = "\n".join(output)
39 return output
40

◆ __processFile__()

GaudiTesting.preprocessors.FilePreprocessor.__processFile__ ( self,
lines )

Definition at line 21 of file preprocessors.py.

21 def __processFile__(self, lines):
22 output = []
23 for l in lines:
24 l = self.__processLine__(l)
25 if l:
26 output.append(l)
27 return output
28

◆ __processLine__()

GaudiTesting.preprocessors.FilePreprocessor.__processLine__ ( self,
line )

Definition at line 18 of file preprocessors.py.

18 def __processLine__(self, line):
19 return line
20

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