![]() |
Belle II Software
light-2303-iriomote
|


Public Member Functions | |
| int | process_file (self, str filepath) |
| def | test_metavariable_data_types (self) |
Static Public Attributes | |
| dictionary | hardcoded |
| we have to hardcode some special cases as data types can't be obtained from source code directly More... | |
| registering_regex | |
| regex for finding the REGISTER_METAVARIABLE statements. More... | |
| extract_regex | |
| regex for extracting the function name and the enum type from REGISTER_METAVARIABLE statements # noqa More... | |
| lambda_type_regex = re.compile(r"-> (?P<lambdatype>double|bool|int)") | |
| regex for extracting the type of the lambda function in metavariable function definition # noqa | |
Determine metavariable types from source code and assert correctness
Definition at line 42 of file test_variables_meta.py.
| int process_file | ( | self, | |
| str | filepath | ||
| ) |
Check all metavariable types for specified file.
Args:
filepath (str): path to file containing REGISTER_METAVARIABLE
Raises:
AssertionError: Raised if no expected function definition is found.
AssertionError: Rased if lambda function has no associated
type information, or no lambda function is defined.
Returns:
int: number of metavariables in file.
Used for sanity checks of the coverage.
Definition at line 77 of file test_variables_meta.py.
| def test_metavariable_data_types | ( | self | ) |
Metavariables have to be registered with the correct Manager::Variable::VariableDataType enum value. This test makes sure Metavariable definition and variable registration are correct.
Definition at line 195 of file test_variables_meta.py.
|
static |
regex for extracting the function name and the enum type from REGISTER_METAVARIABLE statements # noqa
Definition at line 71 of file test_variables_meta.py.
|
static |
we have to hardcode some special cases as data types can't be obtained from source code directly
Definition at line 49 of file test_variables_meta.py.
|
static |
regex for finding the REGISTER_METAVARIABLE statements.
Definition at line 67 of file test_variables_meta.py.