holado 0.11.1__py3-none-any.whl → 0.11.2__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: holado
3
- Version: 0.11.1
3
+ Version: 0.11.2
4
4
  Summary: HolAdo framework
5
5
  Project-URL: Homepage, https://gitlab.com/holado_framework/python
6
6
  Project-URL: Issues, https://gitlab.com/holado_framework/python/-/issues
@@ -31,7 +31,7 @@ holado_binary/tests/behave/steps/ipc/bit_series_steps.py,sha256=x0YZHTBnvFOUkWgl
31
31
  holado_context/__init__.py,sha256=z0SNFOdBBWUouC12WKDmL18T_OH3TdmfcgIbnNQzbjU,1247
32
32
  holado_context/tests/behave/steps/__init__.py,sha256=BHp8TYE_X4lWn4B8A51nXSYaJlczuiDVJLcKMy7p0Lw,1267
33
33
  holado_context/tests/behave/steps/private/__init__.py,sha256=FrQhfaQLz8qTsJVyIGUxV7Hc4jxwSl-CP7rS0EFg4Bk,1281
34
- holado_context/tests/behave/steps/private/common/context_steps.py,sha256=aC2lh6HZ368mo_nTn55Wmn86kFYCAOWjBIpcvDGV2zA,3211
34
+ holado_context/tests/behave/steps/private/common/context_steps.py,sha256=Aika1qRGVrRPPqWVDA5k5HuU_v1aNuEPdqrTTRDlnsY,3224
35
35
  holado_core/__init__.py,sha256=4k0q27nlm4GF9FEIG_7jfc4YUDS82FG_2j50WtGim-Y,2015
36
36
  holado_core/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  holado_core/common/actors/actions.py,sha256=UeD0mFlSyqhU0l5STjJbPNtcDBZuZQaFDFtpwmu9Fvs,4220
@@ -97,8 +97,8 @@ holado_core/common/inspectors/tree_inspector.py,sha256=DYXmzGFQAzAT1pypKqxpOGPze
97
97
  holado_core/common/inspectors/tools/inspect_builder.py,sha256=v7azgwciXHtO-o7gcgI5gOo3B-7rfRs8RQNO_q5LWjI,6830
98
98
  holado_core/common/inspectors/tools/inspect_context.py,sha256=lzhhO5HxG00c6uMPyIXEUz0FHA61VCNUZr_39ykZ8lQ,2700
99
99
  holado_core/common/inspectors/tools/inspect_parameters.py,sha256=2vXUpnZlP2cCYTvI9ddI6NGhONideoM1hBJ0vGdvPKo,7346
100
- holado_core/common/resource/persisted_data_manager.py,sha256=3pI2qPu0O_SQY4AdfeuAWV8LtzXWkb7q7RiAMVpKvGs,6325
101
- holado_core/common/resource/persisted_method_to_call_manager.py,sha256=8iHJF3oPB5PLLLmXK9ncFc7oSyEWyRUWnwJPEzWj3zw,13813
100
+ holado_core/common/resource/persisted_data_manager.py,sha256=Thie2st70tFb2IDWb_3LeLx656WeiW5tpAkI4xc8wQA,6641
101
+ holado_core/common/resource/persisted_method_to_call_manager.py,sha256=LJOCrl2gTa_hyXkt4mLhpsBfDAB3QEIxmcc7gJQop-k,14192
102
102
  holado_core/common/resource/resource_manager.py,sha256=VP86iQ7_NZzQQ0uUpeev1PjgiejUuwKbV5RfGCNC5tI,7179
103
103
  holado_core/common/resource/table_data_manager.py,sha256=bigQGMwh1m3P6ZEO3wi2ftmvyEwpZhGbNCVtI794ops,6289
104
104
  holado_core/common/tables/__init__.py,sha256=i2-gExPOUa_AnmEPgZJQ2lAXeK02PLpPnjEqbsgj1Co,8
@@ -291,7 +291,7 @@ holado_multitask/multithreading/periodicfunctionthreaded.py,sha256=PCBKpbOIThNGL
291
291
  holado_multitask/multithreading/thread.py,sha256=dKgw1301nTv-8g7y29ecza9ZB5nhbAKCYs1p4KdmLUQ,9376
292
292
  holado_multitask/multithreading/threadsmanager.py,sha256=5a-kV8t0-lwL6a9vCLL3_Oi-i67epcqOWWBz6vIJFEU,8462
293
293
  holado_multitask/multithreading/timer.py,sha256=77tI9WITN2CpQoY82SUYinoGzfx_stpqf2fRLUI1Itk,2638
294
- holado_multitask/multithreading/context/thread_context.py,sha256=EWn8zqQZgLlnNhgMsBLULUke3J1VFLtdMR-Jukpvfiw,3773
294
+ holado_multitask/multithreading/context/thread_context.py,sha256=rx-1ZX9GfpyyT0QjJACxpeLWQ_ktVmTjZNZ17qAMorM,3830
295
295
  holado_multitask/multithreading/reflection/inspect.py,sha256=yntSXI6YEZDBfqoDnB0KS6HGxs__qTQFwF6FLUDZqCI,2137
296
296
  holado_multitask/multithreading/reflection/sys.py,sha256=1Q7hX9nddjqUvfn-k39SuPQhwLjXJmB9gegV6vNM534,1558
297
297
  holado_multitask/multithreading/reflection/traceback.py,sha256=Bnq-Xp0aA3D4kYtb7JJyXNASw3iU35WRSePredxWziQ,1891
@@ -402,7 +402,7 @@ holado_s3/tools/s3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
402
402
  holado_s3/tools/s3/boto3_s3_client.py,sha256=NaYTvyxqiUZ5UshpLONSLLDEBHQU_etDlXDOqGNxR-w,2360
403
403
  holado_s3/tools/s3/minio_client.py,sha256=B_Ie2fNIqyJE5vXO4iQw3Tg5yk8k-yGBuJtaf4aDQyU,3193
404
404
  holado_s3/tools/s3/moto_server.py,sha256=zft4KgYIFbJot0JyQJCAwEcbGDJIKinqOUIKRuSrSHE,2493
405
- holado_scripting/__init__.py,sha256=1VICcEckplGOYwcPJ6U0TbghWigTOEtcWuYL6z_U14Y,3908
405
+ holado_scripting/__init__.py,sha256=BocZkbX6KwVnIc14vC-stzPIT0y1S6-VatfXuGgMji4,3967
406
406
  holado_scripting/common/tools/dynamic_text_manager.py,sha256=dR9DGVj4nb_icFlnLB3jRQu8DDwTuC3tX46BDyi9xec,3332
407
407
  holado_scripting/common/tools/evaluate_parameters.py,sha256=zru4_vwqIx_KxWVG_luOcmr-0ywjmY7aaEN4TCvCjb4,10405
408
408
  holado_scripting/common/tools/expression_evaluator.py,sha256=pig2dNisHTuRnLh7vR6ciwn0o8rnDvVOQKT44iF0QB4,24309
@@ -466,12 +466,12 @@ holado_test/behave/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
466
466
  holado_test/behave/behave.py,sha256=IiqT_F45C-xVY2T8sKDPV7NsFCiGNzb8xpoTaXD-PXg,17708
467
467
  holado_test/behave/behave_environment.py,sha256=nwnK2cWwZS3lz-yXhhwuJxKU1aKiTgHbhAzKwIymqng,6575
468
468
  holado_test/behave/behave_function.py,sha256=2jDZIIijgQegWHmuzX1DlqRzs4utGjK1OeoucSeCTdg,1691
469
- holado_test/behave/behave_manager.py,sha256=TEAfPgBQQONFn_l0s7gm7gDgWU0EejvuaPuFApoY_jY,26965
469
+ holado_test/behave/behave_manager.py,sha256=c4kIz9K9LPFxD3clNQM5Vt_The0Usx8GJ1OUaMSP-Kg,27095
470
470
  holado_test/behave/independant_runner.py,sha256=QR_IS-qkK_x2FTryb2gRQrqyBU3YUgKqsaIL2xwXPNQ,3189
471
471
  holado_test/behave/scenario/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
472
472
  holado_test/behave/scenario/behave_step_tools.py,sha256=apMS8nvdY-vbXsUIw1mVR4wOy2xWHMOCPJ1QiYNU-hI,6612
473
- holado_test/common/context/feature_context.py,sha256=XD5t2O6IDdhh6n4K1n7u5MPm-zI3k38mun_pj8lKQGE,3575
474
- holado_test/common/context/scenario_context.py,sha256=lj332-EsRazz91Twl64iTcrNiyqOBYCk9kD4ADl73gA,7330
473
+ holado_test/common/context/feature_context.py,sha256=vJs1-rYtqxv4gETHAwVntdvaulhdDBdJlfVZn6CjBQc,3632
474
+ holado_test/common/context/scenario_context.py,sha256=M0l1JywoXFODjWShcEYbdmSw6kE62Z0uaRmyG0HbDMQ,7387
475
475
  holado_test/common/context/step_context.py,sha256=jknJVU0OrzRaqlTJyhwBFjr9uKPe1dgjao32F4RGE8g,2410
476
476
  holado_test/common/exceptions/undefined_step_exception.py,sha256=SHHX22iz4Ip-V4Y3aM2EJFDt30CCS5EaauN6KB-JORo,1461
477
477
  holado_test/scenario/step_tools.py,sha256=iNay6tQPUi4sG-a8PY5LbbLpX0PRakkOj3ls98aEbHM,26375
@@ -531,6 +531,7 @@ test_holado/initialize_holado.py,sha256=IPYH-GYNiHV5-7ZCCH6CFmPpmACsPrTV74TYz3MR
531
531
  test_holado/logging.conf,sha256=vsCMsRnvSMHl6nBmRqG7kBYC3qshAcxiAg5iUUw1Udw,1318
532
532
  test_holado/test_holado_session_context.py,sha256=qOB_i2k8mYjkR3-q2uv0B04xFc1K3p-K20ttYwe1Z18,1364
533
533
  test_holado/features/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
534
+ test_holado/features/Configuration/Actions/execute_persisted_post_processes.feature,sha256=1so1MtYGj8Wj_UkCzpej_X8Lf_JVWYtzMyRtBmyQaOc,527
534
535
  test_holado/features/NonReg/api/REST.feature,sha256=yAhCpWk7HbHztkdwkfcU-TrfnJVoOzHvYMmk9pUy50A,689
535
536
  test_holado/features/NonReg/api/gRPC.feature,sha256=IHPDsRHhKs5WgsrVXa_jiBjbvnVumCmsQ0O6RLkD1S4,4718
536
537
  test_holado/features/NonReg/common/multiprocessing/simple.feature,sha256=bNDoWWTg1vOy0O_-0fmAlBPDXSxt7GBdDNy3XvtoEfU,1729
@@ -645,7 +646,7 @@ test_holado/tools/django/api_rest/api_rest/api1/serializers.py,sha256=o_YxFr-tgC
645
646
  test_holado/tools/django/api_rest/api_rest/api1/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
646
647
  test_holado/tools/django/api_rest/api_rest/api1/views.py,sha256=kOt2xT6bxO47_z__5yYR9kcYIWWv4qYzpX0K8Tqonik,758
647
648
  test_holado/tools/django/api_rest/api_rest/api1/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
648
- holado-0.11.1.dist-info/METADATA,sha256=GhN1BYdTrXpkc9x9nimJYj3xqk4EJLEgMmydezMtspM,7672
649
- holado-0.11.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
650
- holado-0.11.1.dist-info/licenses/LICENSE,sha256=IgGmNlcFHnbp7UWrLJqAFvs_HIgjJDTmjCNRircJLsk,1070
651
- holado-0.11.1.dist-info/RECORD,,
649
+ holado-0.11.2.dist-info/METADATA,sha256=L3DvfWDcA_X7lolqA4a5NnxHE5FvhaSE2_8avKN8k8Y,7672
650
+ holado-0.11.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
651
+ holado-0.11.2.dist-info/licenses/LICENSE,sha256=IgGmNlcFHnbp7UWrLJqAFvs_HIgjJDTmjCNRircJLsk,1070
652
+ holado-0.11.2.dist-info/RECORD,,
@@ -34,7 +34,7 @@ def __get_variable_manager():
34
34
 
35
35
  def __get_context(context_name):
36
36
  context_name = context_name.capitalize()
37
- if context_name == SessionContext.instance().name:
37
+ if context_name in ["Session", SessionContext.instance().name]:
38
38
  return SessionContext.instance()
39
39
  elif context_name == __get_scenario_context().name:
40
40
  return __get_scenario_context()
@@ -41,6 +41,10 @@ class PersistedDataManager():
41
41
  def table_name(self):
42
42
  return self.__table_name
43
43
 
44
+ def does_persistent_db_exist(self):
45
+ return self.__resource_manager.has_data_table(self.__table_name, db_name=self.__db_name, is_persistent=True) \
46
+ and self.__resource_manager.check_data_table_schema(self.__table_name, self.__table_sql_create, db_name=self.__db_name, is_persistent=True)
47
+
44
48
  def ensure_persistent_db_exists(self):
45
49
  if self.__resource_manager.has_data_table(self.__table_name, db_name=self.__db_name, is_persistent=True):
46
50
  if self.__resource_manager.check_data_table_schema(self.__table_name, self.__table_sql_create, db_name=self.__db_name, is_persistent=True):
@@ -17,7 +17,8 @@ from holado_core.common.resource.persisted_data_manager import PersistedDataMana
17
17
  from holado_python.standard_library.typing import Typing
18
18
  from holado_core.common.exceptions.technical_exception import TechnicalException
19
19
  from holado_core.common.tools.tools import Tools
20
- from holado.common.handlers.undefined import undefined_value, undefined_argument
20
+ from holado.common.handlers.undefined import undefined_value, undefined_argument,\
21
+ any_value
21
22
  from holado_python.common.tools.datetime import DateTime
22
23
  from holado_db.tools.db.query.base.query_builder import DBCompareOperator
23
24
  from holado.common.handlers.enums import AutoNumber
@@ -34,6 +35,11 @@ class MethodCallStatus(AutoNumber):
34
35
 
35
36
  class PersistedMethodToCallManager(PersistedDataManager):
36
37
  def __init__(self, scope_name, delete_on_success=True, delete_on_fail=False, delete_on_success_after_fail=False, expiration_try_counter=10, data_name="method", table_name="method_to_call", db_name="default"):
38
+ """ Constructor
39
+ @param scope_name: Scope of this manager
40
+
41
+ Note: if scope_name is any_value, it is possible to call all methods persisted with any scope, but it is not possible to add new methods.
42
+ """
37
43
  super().__init__(data_name=data_name, table_name=table_name,
38
44
  table_sql_create=self._get_default_table_sql_create(table_name),
39
45
  db_name=db_name)
@@ -93,6 +99,9 @@ class PersistedMethodToCallManager(PersistedDataManager):
93
99
  @param delete_on_fail: If True, delete method after its fail
94
100
  @param delete_on_success_after_fail: If True, delete method after its success even if it has previously failed
95
101
  """
102
+ if self.__scope_name is not any_value:
103
+ raise TechnicalException("To add a method to call, the scope name must be specified")
104
+
96
105
  # Define persisted data that can define if method is already persisted
97
106
  data = {
98
107
  'scope_name': self.__scope_name,
@@ -160,7 +169,9 @@ class PersistedMethodToCallManager(PersistedDataManager):
160
169
  return 0
161
170
 
162
171
  def __get_functions_and_methods_to_call(self, use=undefined_argument, use_index=None):
163
- filter_data = {'scope_name':self.__scope_name}
172
+ filter_data = {}
173
+ if self.__scope_name is not any_value:
174
+ filter_data['scope_name'] = self.__scope_name
164
175
  if use is not undefined_argument:
165
176
  filter_data['use'] = use
166
177
  if use_index is not None:
@@ -172,7 +183,6 @@ class PersistedMethodToCallManager(PersistedDataManager):
172
183
  """Call methods of given use
173
184
  @param use: Define persistent usage. It usually corresponds to a specific scope.
174
185
  @param use_index: If defined, call only functions and methods of given index.
175
- @param delete_after_call: Define if function or method is deleted after call from persisted data.
176
186
  """
177
187
  # Get functions and methods to call
178
188
  methods_data = self.__get_functions_and_methods_to_call(use=use)
@@ -61,7 +61,7 @@ class ThreadContext(Context):
61
61
 
62
62
  manager = VariableManager(var_man)
63
63
  self.set_object("variable_manager", manager)
64
- file_path = SessionContext.instance().report_manager.get_path("logs", f"variable_update-thread_{self.thread_uid}.log")
64
+ file_path = SessionContext.instance().report_manager.get_path("logs", f"variable_update-thread_{self.thread_uid}.log") if SessionContext.instance().with_session_path else None
65
65
  manager.initialize(SessionContext.instance().dynamic_text_manager, SessionContext.instance().unique_value_manager,
66
66
  variable_update_log_file_path=file_path)
67
67
  return self.get_object("variable_manager")
@@ -28,7 +28,7 @@ def register():
28
28
  SessionContext.instance().services.register_service_type("variable_manager", VariableManager,
29
29
  lambda m: m.initialize(SessionContext.instance().dynamic_text_manager,
30
30
  SessionContext.instance().unique_value_manager,
31
- variable_update_log_file_path=SessionContext.instance().report_manager.get_path("logs", "variable_update.log") ) )
31
+ variable_update_log_file_path = SessionContext.instance().report_manager.get_path("logs", "variable_update.log") if SessionContext.instance().with_session_path else None ) )
32
32
 
33
33
 
34
34
  from holado_scripting.common.tools.expression_evaluator import ExpressionEvaluator
@@ -18,6 +18,7 @@ import behave
18
18
  from holado.common.context.session_context import SessionContext
19
19
  from holado_core.common.exceptions.technical_exception import TechnicalException
20
20
  from holado_multitask.multitasking.multitask_manager import MultitaskManager
21
+ import time
21
22
 
22
23
  logger = logging.getLogger(__name__)
23
24
 
@@ -390,6 +391,8 @@ class BehaveManager(object):
390
391
  lambda: context_exists(MultitaskManager.get_process_id(), thread_uid))
391
392
  wait_context.redo_until(True)
392
393
  wait_context.execute()
394
+ # Note: previous waiting mechanism is sometimes to rapid to execute steps just after
395
+ time.sleep(0.01)
393
396
 
394
397
  ### Other tried implementation:
395
398
 
@@ -73,7 +73,7 @@ class FeatureContext(Context):
73
73
  if not self.has_variable_manager():
74
74
  manager = VariableManager(SessionContext.instance().multitask_manager.get_thread_context().get_variable_manager())
75
75
  self.set_object("variable_manager", manager)
76
- file_path = SessionContext.instance().report_manager.current_feature_report.get_path("logs", "variable_update.log")
76
+ file_path = SessionContext.instance().report_manager.current_feature_report.get_path("logs", "variable_update.log") if SessionContext.instance().with_session_path else None
77
77
  manager.initialize(SessionContext.instance().dynamic_text_manager, SessionContext.instance().unique_value_manager,
78
78
  variable_update_log_file_path=file_path)
79
79
  return self.get_object("variable_manager")
@@ -135,7 +135,7 @@ class ScenarioContext(Context):
135
135
  if not self.has_variable_manager():
136
136
  manager = VariableManager(SessionContext.instance().get_feature_context().get_variable_manager())
137
137
  self.set_object("variable_manager", manager)
138
- file_path = SessionContext.instance().report_manager.current_scenario_report.get_path("logs", "variable_update.log")
138
+ file_path = SessionContext.instance().report_manager.current_scenario_report.get_path("logs", "variable_update.log") if SessionContext.instance().with_session_path else None
139
139
  manager.initialize(self.get_dynamic_text_manager(), SessionContext.instance().unique_value_manager,
140
140
  variable_update_log_file_path=file_path)
141
141
  return self.get_object("variable_manager")
@@ -0,0 +1,13 @@
1
+ @configuration
2
+ @execute_persisted_post_processes
3
+ Feature: Execute persisted post processes
4
+ # Note: scenario post processes are executed before session post processes since it is the usual order of execution
5
+
6
+ @scenario_post_processes
7
+ Scenario: Execute persisted post processes at scenario level
8
+ When execute persisted post processes of scenario context
9
+
10
+ @session_post_processes
11
+ Scenario: Execute persisted post processes at session level
12
+ When execute persisted post processes of session context
13
+