holado 0.2.4__py3-none-any.whl → 0.2.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of holado might be problematic. Click here for more details.
- holado/__init__.py +62 -26
- holado/common/context/service_manager.py +10 -2
- holado/common/context/session_context.py +43 -12
- holado/common/handlers/object.py +14 -5
- holado/common/handlers/undefined.py +16 -6
- holado/holado_config.py +1 -0
- {holado-0.2.4.dist-info → holado-0.2.6.dist-info}/METADATA +1 -1
- {holado-0.2.4.dist-info → holado-0.2.6.dist-info}/RECORD +49 -48
- holado_core/common/block/scope_steps.py +2 -2
- holado_core/common/resource/persisted_method_to_call_manager.py +2 -2
- holado_core/common/tools/path_manager.py +8 -4
- holado_core/common/tools/tools.py +24 -7
- holado_grpc/api/rpc/grpc_client.py +122 -118
- holado_helper/docker/logging.conf +3 -1
- holado_helper/docker/run_holado_test_nonreg_in_docker.sh +28 -28
- holado_helper/docker/run_terminal_in_docker-with_docker_control.sh +27 -27
- holado_helper/docker/run_terminal_in_docker.sh +26 -26
- holado_helper/initialize_holado.py +72 -0
- holado_helper/script/action.py +21 -9
- holado_helper/script/initialize_script.py +8 -28
- holado_helper/script/script.py +2 -2
- holado_logging/__init__.py +5 -8
- holado_logging/common/logging/holado_logger.py +2 -2
- holado_logging/common/logging/log_config.py +43 -18
- holado_logging/common/logging/log_manager.py +20 -19
- holado_multitask/multitasking/multitask_manager.py +1 -1
- holado_multitask/multithreading/thread.py +8 -4
- holado_protobuf/ipc/protobuf/protobuf_messages.py +1 -1
- holado_scripting/common/tools/evaluate_parameters.py +23 -5
- holado_scripting/common/tools/expression_evaluator.py +115 -113
- holado_scripting/tests/behave/steps/scenario/if_steps.py +2 -2
- holado_scripting/text/interpreter/functions/function_hex_to_bytes.py +1 -1
- holado_scripting/text/interpreter/text_interpreter.py +20 -21
- holado_test/behave/behave_environment.py +31 -12
- holado_test/behave/independant_runner.py +3 -5
- holado_test/scenario/step_tools.py +13 -12
- holado_test/scenario/tester_tools.py +3 -1
- holado_value/common/tables/comparators/table_2_value_table_cell_comparator.py +1 -1
- holado_value/common/tables/converters/value_table_converter.py +1 -1
- holado_value/common/tables/value_table_cell.py +5 -1
- holado_value/common/tools/value.py +56 -33
- holado_value/common/tools/value_types.py +6 -0
- test_holado/environment.py +1 -1
- test_holado/features/NonReg/{ipc → holado_binary}/bit_series.feature +13 -0
- test_holado/features/NonReg/test_steps/common.feature +1 -1
- test_holado/logging.conf +3 -1
- {holado-0.2.4.dist-info → holado-0.2.6.dist-info}/WHEEL +0 -0
- {holado-0.2.4.dist-info → holado-0.2.6.dist-info}/licenses/LICENSE +0 -0
- /test_holado/features/NonReg/{ipc → holado_binary}/bit_series.error.feature +0 -0
|
@@ -78,7 +78,6 @@ class StepTools(object):
|
|
|
78
78
|
res = text.encode('latin-1').decode('unicode-escape')
|
|
79
79
|
|
|
80
80
|
if Tools.do_log(logger, logging.TRACE): # @UndefinedVariable
|
|
81
|
-
|
|
82
81
|
logger.trace("unescaping string [{}] -> [{}]".format(text, res))
|
|
83
82
|
return res
|
|
84
83
|
|
|
@@ -88,8 +87,8 @@ class StepTools(object):
|
|
|
88
87
|
|
|
89
88
|
@staticmethod
|
|
90
89
|
def evaluate_string_parameter(text_param, do_interpret=True, log_level=logging.DEBUG):
|
|
91
|
-
eval_params = EvaluateParameters.default().with_interpret(do_interpret).with_eval(False)
|
|
92
|
-
res = StepTools._get_expression_evaluator().evaluate_expression(text_param, eval_params=eval_params, log_level=logging.TRACE) # @UndefinedVariable
|
|
90
|
+
eval_params = EvaluateParameters.default().with_interpret(do_interpret).with_eval(False).with_result_type(str)
|
|
91
|
+
_, res = StepTools._get_expression_evaluator().evaluate_expression(text_param, eval_params=eval_params, log_level=Tools.do_log_level(log_level, logging.TRACE)) # @UndefinedVariable
|
|
93
92
|
if Tools.do_log_if_objects_are_different(logger, log_level, text_param, res):
|
|
94
93
|
logger.log(log_level, "evaluate_string_parameter: [{}] -> [{}]".format(text_param, res))
|
|
95
94
|
return res
|
|
@@ -99,8 +98,8 @@ class StepTools(object):
|
|
|
99
98
|
if text_param is None:
|
|
100
99
|
return None
|
|
101
100
|
|
|
102
|
-
eval_params = EvaluateParameters.default_without_eval(False)
|
|
103
|
-
res = StepTools._get_text_interpreter().interpret(text_param, eval_params=eval_params, log_level=logging.TRACE) # @UndefinedVariable
|
|
101
|
+
eval_params = EvaluateParameters.default_without_eval(False).with_result_type(str)
|
|
102
|
+
res = StepTools._get_text_interpreter().interpret(text_param, eval_params=eval_params, log_level=Tools.do_log_level(log_level, logging.TRACE)) # @UndefinedVariable
|
|
104
103
|
if Tools.do_log_if_objects_are_different(logger, log_level, text_param, res):
|
|
105
104
|
logger.log(log_level, f"evaluate_variable_name: [{text_param}] -> [{res}] (type: {Typing.get_object_class_fullname(res)})")
|
|
106
105
|
return res
|
|
@@ -111,7 +110,7 @@ class StepTools(object):
|
|
|
111
110
|
return None
|
|
112
111
|
|
|
113
112
|
eval_params = EvaluateParameters.default_without_eval(False)
|
|
114
|
-
res = StepTools._get_expression_evaluator().evaluate_expression(text_param, eval_params=eval_params, log_level=logging.TRACE) # @UndefinedVariable
|
|
113
|
+
_, res = StepTools._get_expression_evaluator().evaluate_expression(text_param, eval_params=eval_params, log_level=Tools.do_log_level(log_level, logging.TRACE)) # @UndefinedVariable
|
|
115
114
|
if Tools.do_log_if_objects_are_different(logger, log_level, text_param, res):
|
|
116
115
|
logger.log(log_level, f"evaluate_variable_name: [{text_param}] -> [{res}] (type: {Typing.get_object_class_fullname(res)})")
|
|
117
116
|
return res
|
|
@@ -122,14 +121,14 @@ class StepTools(object):
|
|
|
122
121
|
return None
|
|
123
122
|
|
|
124
123
|
eval_params = EvaluateParameters.default().with_raise_on_eval_error(False)
|
|
125
|
-
res = StepTools._get_expression_evaluator().evaluate_expression(text_param, eval_params=eval_params, log_level=logging.TRACE) # @UndefinedVariable
|
|
124
|
+
_, res = StepTools._get_expression_evaluator().evaluate_expression(text_param, eval_params=eval_params, log_level=Tools.do_log_level(log_level, logging.TRACE)) # @UndefinedVariable
|
|
126
125
|
if Tools.do_log_if_objects_are_different(logger, log_level, text_param, res):
|
|
127
126
|
logger.log(log_level, f"evaluate_scenario_parameter: [{text_param}] -> [{res}] (type: {Typing.get_object_class_fullname(res)})")
|
|
128
127
|
return res
|
|
129
128
|
|
|
130
129
|
@staticmethod
|
|
131
130
|
def evaluate_list_scenario_parameter(text_param, param_name, log_level=logging.DEBUG):
|
|
132
|
-
res = StepTools.evaluate_scenario_parameter(text_param)
|
|
131
|
+
res = StepTools.evaluate_scenario_parameter(text_param, log_level=log_level)
|
|
133
132
|
if isinstance(res, str):
|
|
134
133
|
regex = re.compile(r"^\s*\[(.*)\]\s*$")
|
|
135
134
|
m = regex.match(res)
|
|
@@ -294,8 +293,8 @@ class StepTools(object):
|
|
|
294
293
|
@classmethod
|
|
295
294
|
def has_table_header(cls, table):
|
|
296
295
|
"""
|
|
297
|
-
Return True if scenario table has a header (for
|
|
298
|
-
For
|
|
296
|
+
Return True if scenario table has a header (for HolAdo framework).
|
|
297
|
+
For HolAdo framework, table header names are all texts without quotes.
|
|
299
298
|
"""
|
|
300
299
|
internal_header = cls._get_table_header(table)
|
|
301
300
|
if internal_header is None:
|
|
@@ -303,7 +302,7 @@ class StepTools(object):
|
|
|
303
302
|
|
|
304
303
|
for cell in internal_header:
|
|
305
304
|
scell = ValueTableCell(cell)
|
|
306
|
-
if scell.value_type
|
|
305
|
+
if not ( scell.content_type == ValueTypes.Symbol and scell.value_type == ValueTypes.String ):
|
|
307
306
|
return False
|
|
308
307
|
|
|
309
308
|
return True
|
|
@@ -402,7 +401,7 @@ class StepTools(object):
|
|
|
402
401
|
def format_steps_with(cls, steps, format_with_list):
|
|
403
402
|
res = steps
|
|
404
403
|
for form in format_with_list:
|
|
405
|
-
form_eval = cls._get_expression_evaluator().evaluate_expression(form)
|
|
404
|
+
_, form_eval = cls._get_expression_evaluator().evaluate_expression(form, log_level=logging.TRACE) # @UndefinedVariable
|
|
406
405
|
if form_eval == form:
|
|
407
406
|
raise FunctionalException(f"Not able to evaluation expression [{form}]. Is missing its initialization ?")
|
|
408
407
|
res = res.replace(f"${{{form}}}", str(form_eval))
|
|
@@ -426,6 +425,8 @@ class StepTools(object):
|
|
|
426
425
|
new_type = {'pattern':pattern, 'function':func}
|
|
427
426
|
if type_name in cls.__registered_types:
|
|
428
427
|
logger.warning(f"Overriding step parameter type '{type_name}': {cls.__registered_types[type_name]['pattern']} -> {new_type['pattern']}")
|
|
428
|
+
import traceback
|
|
429
|
+
logging.warning("".join(traceback.format_list(traceback.extract_stack())))
|
|
429
430
|
cls.__registered_types[type_name] = new_type
|
|
430
431
|
if Tools.do_log(logger, logging.TRACE): # @UndefinedVariable
|
|
431
432
|
logger.trace(f"Registered step parameter type '{type_name}'")
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
from holado.common.context.session_context import SessionContext
|
|
15
15
|
import logging
|
|
16
16
|
from holado_core.common.tables.table import Table
|
|
17
|
+
from holado_core.common.tools.tools import Tools
|
|
17
18
|
|
|
18
19
|
logger = logging.getLogger(__name__)
|
|
19
20
|
|
|
@@ -47,6 +48,7 @@ class TesterTools(object):
|
|
|
47
48
|
if isinstance(obj, Table):
|
|
48
49
|
res = obj.represent()
|
|
49
50
|
else:
|
|
50
|
-
res = str(obj)
|
|
51
|
+
# res = str(obj)
|
|
52
|
+
res = Tools.represent_object(obj)
|
|
51
53
|
return res
|
|
52
54
|
|
|
@@ -121,7 +121,7 @@ class Table2ValueTable_CellComparator(TableCellComparator):
|
|
|
121
121
|
res = comparator.equals(cell_1_value, cell_2_value, is_obtained_vs_expected=is_obtained_vs_expected, raise_exception=raise_exception)
|
|
122
122
|
elif value_type == ValueTypes.Merged:
|
|
123
123
|
return super().equals(cell_1, cell_2, is_obtained_vs_expected, raise_exception)
|
|
124
|
-
elif
|
|
124
|
+
elif ValueTypes.is_string(value_type):
|
|
125
125
|
res = self._equals_string(cell_1, cell_2, is_obtained_vs_expected, raise_exception)
|
|
126
126
|
elif value_type == ValueTypes.Symbol:
|
|
127
127
|
res = self._equals_symbol(cell_1, cell_2, is_obtained_vs_expected, raise_exception)
|
|
@@ -158,7 +158,7 @@ class ValueTableConverter(TableConverter):
|
|
|
158
158
|
|
|
159
159
|
if row.get_cell(1).value_type in [ValueTypes.NotApplicable, ValueTypes.Merged]:
|
|
160
160
|
pass
|
|
161
|
-
elif row.get_cell(1).value_type
|
|
161
|
+
elif ValueTypes.is_string(row.get_cell(1).value_type):
|
|
162
162
|
name = row.get_cell(0).value
|
|
163
163
|
value = row.get_cell(1).value
|
|
164
164
|
|
|
@@ -31,7 +31,7 @@ class ValueTableCell(TableCell):
|
|
|
31
31
|
super().__init__(cell_content)
|
|
32
32
|
|
|
33
33
|
self.__value = Value(original_value=cell_content, value=cell_value, do_eval_once=do_eval_once)
|
|
34
|
-
self.content = self.__value.
|
|
34
|
+
self.content = self.__value.original_value
|
|
35
35
|
|
|
36
36
|
def __eq__(self, other):
|
|
37
37
|
self._verify_valid_compared_object(other)
|
|
@@ -51,6 +51,10 @@ class ValueTableCell(TableCell):
|
|
|
51
51
|
def string_content(self):
|
|
52
52
|
return self.__value.string_value
|
|
53
53
|
|
|
54
|
+
@property
|
|
55
|
+
def content_type(self):
|
|
56
|
+
return self.__value.original_value_type
|
|
57
|
+
|
|
54
58
|
@property
|
|
55
59
|
def value_type(self):
|
|
56
60
|
return self.__value.value_type
|
|
@@ -20,7 +20,7 @@ from holado_value.common.tools.value_types import ValueTypes
|
|
|
20
20
|
from functools import total_ordering
|
|
21
21
|
from holado_scripting.common.tools.evaluate_parameters import EvaluateParameters
|
|
22
22
|
from holado.holado_config import Config
|
|
23
|
-
from holado.common.handlers.undefined import undefined_value
|
|
23
|
+
from holado.common.handlers.undefined import undefined_value, undefined_argument, to_be_defined, not_applicable, is_undefined
|
|
24
24
|
from holado_python.standard_library.typing import Typing
|
|
25
25
|
|
|
26
26
|
logger = logging.getLogger(__name__)
|
|
@@ -29,26 +29,27 @@ logger = logging.getLogger(__name__)
|
|
|
29
29
|
@total_ordering
|
|
30
30
|
class Value(object):
|
|
31
31
|
|
|
32
|
-
def __init__(self, original_value=
|
|
32
|
+
def __init__(self, original_value=undefined_argument, value=undefined_argument, do_eval_once=True, eval_params=undefined_argument):
|
|
33
33
|
"""
|
|
34
34
|
@summary: Constructor
|
|
35
|
-
@param original_value: Original value - can be a string or any object
|
|
35
|
+
@param original_value: Original value (before value expression evaluation) - can be a string or any object
|
|
36
36
|
@param value: Value - can be a string or any object
|
|
37
37
|
"""
|
|
38
|
-
self.
|
|
39
|
-
self.
|
|
40
|
-
self.
|
|
38
|
+
self.__original_value = to_be_defined
|
|
39
|
+
self.__value = to_be_defined
|
|
40
|
+
self.__value_type = None
|
|
41
41
|
|
|
42
42
|
# Manage value evaluation
|
|
43
|
-
self.__value_to_eval =
|
|
44
|
-
self.
|
|
43
|
+
self.__value_to_eval = to_be_defined
|
|
44
|
+
self.__evaluated_value = to_be_defined
|
|
45
|
+
self.__evaluated_value_type = to_be_defined
|
|
45
46
|
# By default, raise on interpret and variable evaluation error, but not on eval error
|
|
46
|
-
self.__eval_params_default = eval_params if eval_params is not
|
|
47
|
+
self.__eval_params_default = eval_params if eval_params is not undefined_argument else EvaluateParameters.default().with_raise_on_eval_error(False)
|
|
47
48
|
self.__do_eval_once = do_eval_once
|
|
48
49
|
|
|
49
50
|
self.__extract_value_information(original_value, value)
|
|
50
51
|
if Tools.do_log(logger, logging.TRACE): # @UndefinedVariable
|
|
51
|
-
logger.trace(f"New Value:
|
|
52
|
+
logger.trace(f"New Value: original_value=[{self.__original_value}] ; type=[{self.value_type.name}] ; value=[{self.__value}] ; value_to_eval=[{self.__value_to_eval}]")
|
|
52
53
|
|
|
53
54
|
def _verify_valid_compared_object(self, other, raise_exception=True):
|
|
54
55
|
res = isinstance(other, Value)
|
|
@@ -73,7 +74,7 @@ class Value(object):
|
|
|
73
74
|
def string_value(self):
|
|
74
75
|
value = self.get_value()
|
|
75
76
|
|
|
76
|
-
if value
|
|
77
|
+
if value in [undefined_value, not_applicable]:
|
|
77
78
|
return Config.NOT_APPLICABLE_SYMBOL
|
|
78
79
|
if value is None:
|
|
79
80
|
return Config.NONE_SYMBOL
|
|
@@ -81,15 +82,22 @@ class Value(object):
|
|
|
81
82
|
return str(value)
|
|
82
83
|
|
|
83
84
|
@property
|
|
84
|
-
def
|
|
85
|
+
def original_value(self):
|
|
85
86
|
"""
|
|
86
87
|
@summary: Return the original value
|
|
87
88
|
"""
|
|
88
|
-
return self.
|
|
89
|
+
return self.__original_value
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def original_value_type(self):
|
|
93
|
+
"""
|
|
94
|
+
@summary: Return the original value type
|
|
95
|
+
"""
|
|
96
|
+
return self.__value_type
|
|
89
97
|
|
|
90
98
|
@property
|
|
91
99
|
def value_type(self):
|
|
92
|
-
return self.
|
|
100
|
+
return self.get_value_type()
|
|
93
101
|
|
|
94
102
|
@property
|
|
95
103
|
def value_before_eval(self):
|
|
@@ -105,56 +113,71 @@ class Value(object):
|
|
|
105
113
|
"""
|
|
106
114
|
return self.get_value(raise_if_undefined=True)
|
|
107
115
|
|
|
108
|
-
def get_value(self, raise_if_undefined=False, eval_params=
|
|
116
|
+
def get_value(self, raise_if_undefined=False, eval_params=undefined_argument):
|
|
109
117
|
if self.__value_to_eval is not undefined_value:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
self.__value_evaluated = self.__get_expression_evaluator().evaluate_expression_of_information(self.__type, self.__value_to_eval, eval_params=eval_params)
|
|
113
|
-
res = self.__value_evaluated
|
|
118
|
+
self.__evaluate_value_if_needed(eval_params=eval_params)
|
|
119
|
+
res = self.__evaluated_value
|
|
114
120
|
else:
|
|
115
121
|
res = self.__value
|
|
116
122
|
|
|
117
|
-
if res
|
|
123
|
+
if is_undefined(res) and raise_if_undefined:
|
|
118
124
|
msg = "Value is undefined"
|
|
119
125
|
if self.value_type == ValueTypes.NotApplicable:
|
|
120
126
|
msg += " (Not Applicable)"
|
|
121
|
-
raise ValueError(f"Value is undefined (value type: {self.value_type.name} ; original value: [{self.
|
|
127
|
+
raise ValueError(f"Value is undefined (value type: {self.value_type.name} ; original value: [{self.original_value}] (type: {Typing.get_object_class_fullname(self.original_value)}))")
|
|
128
|
+
return res
|
|
129
|
+
|
|
130
|
+
def get_value_type(self, eval_params=undefined_argument):
|
|
131
|
+
if self.__value_to_eval is not undefined_value:
|
|
132
|
+
self.__evaluate_value_if_needed(eval_params=eval_params)
|
|
133
|
+
res = self.__evaluated_value_type
|
|
134
|
+
else:
|
|
135
|
+
res = self.__value_type
|
|
122
136
|
return res
|
|
123
137
|
|
|
138
|
+
def __evaluate_value_if_needed(self, eval_params=undefined_argument):
|
|
139
|
+
if self.__evaluated_value is to_be_defined or not self.__do_eval_once:
|
|
140
|
+
eval_params = eval_params if eval_params is not undefined_argument else self.__eval_params_default
|
|
141
|
+
if ValueTypes.is_string(self.__value_type):
|
|
142
|
+
eval_params = eval_params.with_result_type(str)
|
|
143
|
+
self.__evaluated_value_type, self.__evaluated_value = self.__get_expression_evaluator().evaluate_expression_of_information(self.__value_type, self.__value_to_eval, eval_params=eval_params)
|
|
144
|
+
|
|
124
145
|
def represent(self, indent = 0, do_evaluation = False):
|
|
125
146
|
res_list = []
|
|
126
147
|
|
|
127
148
|
res_list.append(Tools.get_indent_string(indent))
|
|
128
149
|
|
|
129
|
-
if
|
|
150
|
+
if ValueTypes.is_string(self.__value_type):
|
|
130
151
|
if do_evaluation:
|
|
131
152
|
res_list.append("'")
|
|
132
153
|
res_list.append(self.string_value)
|
|
133
154
|
res_list.append("'")
|
|
134
155
|
else:
|
|
135
|
-
res_list.append(str(self.
|
|
136
|
-
elif self.
|
|
156
|
+
res_list.append(str(self.original_value))
|
|
157
|
+
elif self.__value_type in [ValueTypes.Boolean, ValueTypes.Integer, ValueTypes.Float, ValueTypes.Null, ValueTypes.NotApplicable, ValueTypes.Symbol, ValueTypes.Generic]:
|
|
137
158
|
if do_evaluation:
|
|
138
159
|
res_list.append(self.string_value)
|
|
139
160
|
else:
|
|
140
|
-
res_list.append(str(self.
|
|
161
|
+
res_list.append(str(self.original_value))
|
|
141
162
|
else:
|
|
142
|
-
raise TechnicalException("Unmanaged value type '{}'".format(self.
|
|
163
|
+
raise TechnicalException("Unmanaged value type '{}'".format(self.__value_type.name))
|
|
143
164
|
|
|
144
165
|
return "".join(res_list)
|
|
145
166
|
|
|
146
|
-
def __extract_value_information(self,
|
|
167
|
+
def __extract_value_information(self, original_value, value):
|
|
147
168
|
# Define original value
|
|
148
|
-
if
|
|
149
|
-
self.
|
|
150
|
-
elif value is not
|
|
169
|
+
if original_value is not undefined_argument and not (original_value in [undefined_value, None] and value not in [undefined_argument, undefined_value, None]):
|
|
170
|
+
self.__original_value = original_value
|
|
171
|
+
elif value is not undefined_argument:
|
|
151
172
|
if value is not None and isinstance(value, str):
|
|
152
|
-
self.
|
|
173
|
+
self.__original_value = f"'{value}'"
|
|
153
174
|
else:
|
|
154
|
-
self.
|
|
175
|
+
self.__original_value = value
|
|
155
176
|
|
|
156
177
|
# Define value information from original value
|
|
157
|
-
self.
|
|
178
|
+
self.__value_type, self.__value, self.__value_to_eval = self.__get_expression_evaluator().extract_expression_information(self.original_value)
|
|
179
|
+
if Tools.do_log(logger, logging.TRACE): # @UndefinedVariable
|
|
180
|
+
logger.trace(f"extracted value info: {self.__value_type=}, {self.__value=}, {self.__value_to_eval=}")
|
|
158
181
|
|
|
159
182
|
def __get_expression_evaluator(self):
|
|
160
183
|
if SessionContext.instance().has_scenario_context():
|
|
@@ -32,4 +32,10 @@ class ValueTypes(AutoNumber):
|
|
|
32
32
|
Merged = ()
|
|
33
33
|
Symbol = ()
|
|
34
34
|
Generic = ()
|
|
35
|
+
|
|
36
|
+
@classmethod
|
|
37
|
+
def is_string(cls, value_type):
|
|
38
|
+
return value_type in [ValueTypes.String, ValueTypes.DynamicString, ValueTypes.ThreadDynamicString, ValueTypes.UniqueString]
|
|
39
|
+
|
|
40
|
+
|
|
35
41
|
|
test_holado/environment.py
CHANGED
|
@@ -31,7 +31,7 @@ import holado
|
|
|
31
31
|
# - log_on_console is True for initialization phase, it will be set to False when root log file will be defined
|
|
32
32
|
# - logging config file
|
|
33
33
|
from test_holado.test_holado_session_context import TestHoladoSessionContext
|
|
34
|
-
holado.initialize(TSessionContext=TestHoladoSessionContext,
|
|
34
|
+
holado.initialize(TSessionContext=TestHoladoSessionContext, logging_config_file_path=os.path.join(here, 'logging.conf'), log_level=logging.INFO, log_on_console=True)
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@go_nogo
|
|
4
4
|
Feature: Test bit_series module
|
|
5
5
|
|
|
6
|
+
@to_hexadecimal_string
|
|
6
7
|
Scenario: Create and convert bit-series to hexa
|
|
7
8
|
Given BIT_SERIES = bit series
|
|
8
9
|
| Name | Bit length | Type | Value |
|
|
@@ -24,6 +25,9 @@ Feature: Test bit_series module
|
|
|
24
25
|
Given RAW_TM = convert bit series BIT_SERIES to hexadecimal string
|
|
25
26
|
Then RAW_TM == '99FFFFAE1B'
|
|
26
27
|
|
|
28
|
+
|
|
29
|
+
@to_hexadecimal_string
|
|
30
|
+
@padding
|
|
27
31
|
Scenario: Create and convert to hexa bit-series of bit length out of bytes array length
|
|
28
32
|
Given BIT_SERIES = bit series
|
|
29
33
|
| Name | Bit length | Type | Value |
|
|
@@ -56,6 +60,8 @@ Feature: Test bit_series module
|
|
|
56
60
|
Given RAW_TM = convert bit series BIT_SERIES to hexadecimal string (right padded)
|
|
57
61
|
Then RAW_TM == '92'
|
|
58
62
|
|
|
63
|
+
|
|
64
|
+
@from_hexadecimal_string
|
|
59
65
|
Scenario: Create a bit-series from hexa
|
|
60
66
|
Given BIT_SERIES = bit series
|
|
61
67
|
| Name | Bit length | Type |
|
|
@@ -71,6 +77,9 @@ Feature: Test bit_series module
|
|
|
71
77
|
| 'F3' | 2 | int | 0 |
|
|
72
78
|
| 'F4' | 2 | int | 2 |
|
|
73
79
|
|
|
80
|
+
|
|
81
|
+
@from_hexadecimal_string
|
|
82
|
+
@padding
|
|
74
83
|
Scenario: Create from hexa bit-series of bit length out of bytes array length
|
|
75
84
|
Given BIT_SERIES = bit series
|
|
76
85
|
| Name | Bit length | Type |
|
|
@@ -99,6 +108,8 @@ Feature: Test bit_series module
|
|
|
99
108
|
| 'F2' | 1 | int | 1 |
|
|
100
109
|
| 'F3' | 1 | int | 1 |
|
|
101
110
|
|
|
111
|
+
|
|
112
|
+
@is_bit_series
|
|
102
113
|
Scenario: Verify hexa string is bit series
|
|
103
114
|
Then hexadecimal string '92' is bit series
|
|
104
115
|
| Name | Bit length | Type | Value |
|
|
@@ -107,6 +118,8 @@ Feature: Test bit_series module
|
|
|
107
118
|
| 'F3' | 2 | int | 0 |
|
|
108
119
|
| 'F4' | 2 | int | 2 |
|
|
109
120
|
|
|
121
|
+
|
|
122
|
+
@set_field
|
|
110
123
|
Scenario: Set bit-series field by variable expression
|
|
111
124
|
Given BIT_SERIES = bit series
|
|
112
125
|
| Name | Bit length | Type | Value |
|
test_holado/logging.conf
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|