base-aux 0.3.11__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.
- base_aux/_0_EXAMPLES_EXPLORE/__init__.py +0 -0
- base_aux/_0_EXAMPLES_EXPLORE/_explore.py +16 -0
- base_aux/_0_EXAMPLES_EXPLORE/main.py +61 -0
- base_aux/_0_EXAMPLES_EXPLORE/test_0_operations.py +72 -0
- base_aux/_0_EXAMPLES_EXPLORE/test_1_funcs.py +50 -0
- base_aux/_0_EXAMPLES_EXPLORE/test_2_cls.py +54 -0
- base_aux/_0_EXAMPLES_EXPLORE/test_3_aio.py +43 -0
- base_aux/__init__.py +0 -0
- base_aux/alerts/_PROJECT.py +23 -0
- base_aux/alerts/__init__.py +0 -0
- base_aux/alerts/_examples.py +99 -0
- base_aux/alerts/_test__1_alerts.py +71 -0
- base_aux/alerts/m1_alert0_base.py +224 -0
- base_aux/alerts/m1_alerts1_smtp.py +88 -0
- base_aux/alerts/m1_alerts2_telegram.py +44 -0
- base_aux/alerts/m2_select.py +11 -0
- base_aux/aux_argskwargs/__init__.py +10 -0
- base_aux/aux_argskwargs/m1_argskwargs.py +112 -0
- base_aux/aux_argskwargs/m2_argskwargs_aux.py +31 -0
- base_aux/aux_argskwargs/m3_args_bool_raise_if.py +138 -0
- base_aux/aux_argskwargs/m4_kwargs_eq_expect.py +225 -0
- base_aux/aux_argskwargs/test_2__kwargs_aux.py +49 -0
- base_aux/aux_argskwargs/test_3__bool_raise_if.py +44 -0
- base_aux/aux_argskwargs/test_4__kwargs_eq_expect.py +104 -0
- base_aux/aux_attr/__init__.py +10 -0
- base_aux/aux_attr/_m4_kits2_stable_keyset.py +66 -0
- base_aux/aux_attr/_test_4_kits2_stableKeySet.py +63 -0
- base_aux/aux_attr/m0_static.py +112 -0
- base_aux/aux_attr/m1_annot_attr1_aux.py +807 -0
- base_aux/aux_attr/m2_annot3_gacls_keys_as_values.py +152 -0
- base_aux/aux_attr/m3_ga0_echo.py +62 -0
- base_aux/aux_attr/m3_ga1_prefix_1_inst.py +145 -0
- base_aux/aux_attr/m3_ga1_prefix_2_cls.py +53 -0
- base_aux/aux_attr/m4_dump0_dumped.py +64 -0
- base_aux/aux_attr/m4_dump1_dumping1_dict.py +76 -0
- base_aux/aux_attr/m4_kits.py +124 -0
- base_aux/aux_attr/m5_attr_diff.py +55 -0
- base_aux/aux_attr/test_0__static.py +34 -0
- base_aux/aux_attr/test_1__attr1_attr.py +248 -0
- base_aux/aux_attr/test_1__attr2_annot1_iter.py +256 -0
- base_aux/aux_attr/test_1__attr2_annot2_other.py +342 -0
- base_aux/aux_attr/test_2__annot4_cls_keys_as_values.py +116 -0
- base_aux/aux_attr/test_3__getattr0_echo.py +24 -0
- base_aux/aux_attr/test_3__getattr3_prefix_1_inst.py +89 -0
- base_aux/aux_attr/test_3__getattr3_prefix_1_inst_raiseif.py +154 -0
- base_aux/aux_attr/test_4__dump_dumping.py +42 -0
- base_aux/aux_attr/test_4__kits.py +79 -0
- base_aux/aux_attr/test_5__diff.py +92 -0
- base_aux/aux_datetime/__init__.py +10 -0
- base_aux/aux_datetime/_sand.py +122 -0
- base_aux/aux_datetime/m1_sleep.py +109 -0
- base_aux/aux_datetime/m2_datetime.py +332 -0
- base_aux/aux_datetime/m3_uptime.py +52 -0
- base_aux/aux_datetime/m4_stopwatch.py +94 -0
- base_aux/aux_datetime/test_1_sleep.py +37 -0
- base_aux/aux_datetime/test_2_datetime.py +116 -0
- base_aux/aux_datetime/test_3_uptime.py +28 -0
- base_aux/aux_dict/_SAND.py +1002 -0
- base_aux/aux_dict/__init__.py +10 -0
- base_aux/aux_dict/m1_dict_aux.py +245 -0
- base_aux/aux_dict/m2_dict_ic.py +205 -0
- base_aux/aux_dict/m3_dict_ga.py +208 -0
- base_aux/aux_dict/m4_dict_diff.py +100 -0
- base_aux/aux_dict/test_1_aux.py +145 -0
- base_aux/aux_dict/test_2_dict_ic_ga.py +229 -0
- base_aux/aux_dict/test_3_dict_ga1.py +195 -0
- base_aux/aux_dict/test_3_dict_ga2_annots_required.py +66 -0
- base_aux/aux_dict/test_4_diff.py +45 -0
- base_aux/aux_eq/__init__.py +0 -0
- base_aux/aux_eq/m1_eq_args.py +47 -0
- base_aux/aux_eq/m2_eq_aux.py +162 -0
- base_aux/aux_eq/m3_eq_valid1_base.py +228 -0
- base_aux/aux_eq/m3_eq_valid2_validators.py +333 -0
- base_aux/aux_eq/m3_eq_valid3_derivatives.py +259 -0
- base_aux/aux_eq/m4_eq_valid_chain.py +46 -0
- base_aux/aux_eq/m5_eq_raise_if.py +71 -0
- base_aux/aux_eq/test_1_eq_args.py +28 -0
- base_aux/aux_eq/test_2_eq_aux.py +42 -0
- base_aux/aux_eq/test_3_eq_valid.py +449 -0
- base_aux/aux_eq/test_45_eq_valid_chain_raise.py +41 -0
- base_aux/aux_iter/__init__.py +10 -0
- base_aux/aux_iter/m1_iter_aux.py +189 -0
- base_aux/aux_iter/test_1__iter_aux.py +153 -0
- base_aux/aux_modules/__init__.py +10 -0
- base_aux/aux_modules/m1_pkgs.py +710 -0
- base_aux/aux_modules/test_1_pkg.py +174 -0
- base_aux/aux_np_pd/__init__.py +0 -0
- base_aux/aux_np_pd/_explore_indicators.py +470 -0
- base_aux/aux_np_pd/m0_typing.py +20 -0
- base_aux/aux_np_pd/m1_np.py +258 -0
- base_aux/aux_np_pd/m2_time_series.py +156 -0
- base_aux/aux_np_pd/m3_indicators.py +217 -0
- base_aux/aux_np_pd/m3_indicators2_derivatives.py +170 -0
- base_aux/aux_np_pd/test_2_time_series.py +30 -0
- base_aux/aux_text/__init__.py +10 -0
- base_aux/aux_text/game1_noun5letters.py +129 -0
- base_aux/aux_text/m0_patterns.py +108 -0
- base_aux/aux_text/m0_text_examples.py +59 -0
- base_aux/aux_text/m1_text_aux.py +524 -0
- base_aux/aux_text/m2_wildcard.py +54 -0
- base_aux/aux_text/m3_parser1_cmd_args_kwargs.py +73 -0
- base_aux/aux_text/m4_ini.py +74 -0
- base_aux/aux_text/m5_re1_rexp.py +31 -0
- base_aux/aux_text/m5_re2_attemps.py +186 -0
- base_aux/aux_text/m7_msg.py +54 -0
- base_aux/aux_text/m7_text_formatted.py +191 -0
- base_aux/aux_text/m8_str_ic.py +211 -0
- base_aux/aux_text/test_0_pat_nums.py +68 -0
- base_aux/aux_text/test_1_text.py +460 -0
- base_aux/aux_text/test_1_text_parse_json.py +50 -0
- base_aux/aux_text/test_2_wildcard.py +51 -0
- base_aux/aux_text/test_3_parser_cmd.py +135 -0
- base_aux/aux_text/test_4_ini.py +43 -0
- base_aux/aux_text/test_5_re1_rexp.py +27 -0
- base_aux/aux_text/test_5_re2_attempts.py +116 -0
- base_aux/aux_text/test_7_text_formatted.py +168 -0
- base_aux/base_enums/_SAND__m4_enum_eq_valid.py +217 -0
- base_aux/base_enums/__init__.py +0 -0
- base_aux/base_enums/m1_enum0_nest_eq.py +109 -0
- base_aux/base_enums/m2_enum1_adj.py +377 -0
- base_aux/base_enums/m3_enum2_value.py +27 -0
- base_aux/base_enums/test_1_enums.py +184 -0
- base_aux/base_lambdas/__init__.py +0 -0
- base_aux/base_lambdas/m1_lambda.py +470 -0
- base_aux/base_lambdas/m1_lambda2_derivatives.py +149 -0
- base_aux/base_lambdas/m2_lambda3_thread.py +78 -0
- base_aux/base_lambdas/m3_lambda4_list.py +97 -0
- base_aux/base_lambdas/m4_thread_collector.py +174 -0
- base_aux/base_lambdas/test_1_lambda.py +67 -0
- base_aux/base_lambdas/test_1_lambda2_resolve_style.py +72 -0
- base_aux/base_lambdas/test_1_lambda3_check_expected.py +332 -0
- base_aux/base_lambdas/test_2_lambda2_thread.py +26 -0
- base_aux/base_lambdas/test_3_thread_collector.py +215 -0
- base_aux/base_monkeys/__init__.py +0 -0
- base_aux/base_monkeys/m0_base.py +11 -0
- base_aux/base_monkeys/m1_ga_self.py +55 -0
- base_aux/base_monkeys/test_1_ga_self.py +37 -0
- base_aux/base_multiton/__init__.py +0 -0
- base_aux/base_multiton/m1_multiton.py +32 -0
- base_aux/base_nest_dunders/__init__.py +0 -0
- base_aux/base_nest_dunders/m0_SAND.py +81 -0
- base_aux/base_nest_dunders/m1_init0_annots_required.py +72 -0
- base_aux/base_nest_dunders/m1_init0_post.py +31 -0
- base_aux/base_nest_dunders/m1_init0_reinit1_mutable_attrs.py +54 -0
- base_aux/base_nest_dunders/m1_init0_reinit2_lambdas_resolve.py +43 -0
- base_aux/base_nest_dunders/m1_init1_args_kwargs.py +49 -0
- base_aux/base_nest_dunders/m1_init1_source.py +68 -0
- base_aux/base_nest_dunders/m1_init1_source2_kwargs.py +43 -0
- base_aux/base_nest_dunders/m1_init2_annots1_attrs_by_args_kwargs.py +71 -0
- base_aux/base_nest_dunders/m1_init2_annots2_by_types.py +35 -0
- base_aux/base_nest_dunders/m1_init3_params_dict_kwargs_update.py +40 -0
- base_aux/base_nest_dunders/m2_repr_clsname_str.py +8 -0
- base_aux/base_nest_dunders/m2_str1_cls.py +58 -0
- base_aux/base_nest_dunders/m2_str2_attrs.py +106 -0
- base_aux/base_nest_dunders/m3_bool.py +52 -0
- base_aux/base_nest_dunders/m3_calls.py +65 -0
- base_aux/base_nest_dunders/m4_ga_self.py +45 -0
- base_aux/base_nest_dunders/m4_gsai_annots.py +58 -0
- base_aux/base_nest_dunders/m5_iter_annots_values.py +44 -0
- base_aux/base_nest_dunders/m5_iter_attrs_name_value.py +59 -0
- base_aux/base_nest_dunders/m6_eq1_attrs.py +73 -0
- base_aux/base_nest_dunders/m6_eq2_cls.py +122 -0
- base_aux/base_nest_dunders/m7_cmp.py +280 -0
- base_aux/base_nest_dunders/m8_contains_attrs.py +38 -0
- base_aux/base_nest_dunders/m8_len_attrs.py +27 -0
- base_aux/base_nest_dunders/m9_meth.py +17 -0
- base_aux/base_nest_dunders/test_1__InitByTypes.py +88 -0
- base_aux/base_nest_dunders/test_1__annots6_init_by_kwargs.py +119 -0
- base_aux/base_nest_dunders/test_1__attr3_lambda_resolve.py +58 -0
- base_aux/base_nest_dunders/test_1__required.py +170 -0
- base_aux/base_nest_dunders/test_2__str1_cls.py +48 -0
- base_aux/base_nest_dunders/test_4__gai.py +135 -0
- base_aux/base_nest_dunders/test_4_ga_self.py +30 -0
- base_aux/base_nest_dunders/test_5__iter_values.py +23 -0
- base_aux/base_nest_dunders/test_6__eq2_cls.py +139 -0
- base_aux/base_nest_dunders/test_6__eq_attrs.py +99 -0
- base_aux/base_nest_dunders/test_7__cmp1_any.py +105 -0
- base_aux/base_nest_dunders/test_7__cmp2_digit.py +432 -0
- base_aux/base_singletons/__SAND_old_singleton.py +628 -0
- base_aux/base_singletons/__init__.py +10 -0
- base_aux/base_singletons/_examples.py +41 -0
- base_aux/base_singletons/m1_singleton.py +190 -0
- base_aux/base_singletons/test_1__singleton.py +177 -0
- base_aux/base_types/__init__.py +10 -0
- base_aux/base_types/_examples.py +305 -0
- base_aux/base_types/m0_static_aux.py +40 -0
- base_aux/base_types/m0_static_types.py +61 -0
- base_aux/base_types/m0_static_typing.py +137 -0
- base_aux/base_types/m1_type_aux.py +463 -0
- base_aux/base_types/m2_info.py +433 -0
- base_aux/base_types/test_0__types.py +808 -0
- base_aux/base_types/test__get_class.py +55 -0
- base_aux/base_types/test__info.py +45 -0
- base_aux/base_values/__init__.py +0 -0
- base_aux/base_values/m1_explicit.py +67 -0
- base_aux/base_values/m2_value_special.py +131 -0
- base_aux/base_values/m3_exceptions.py +310 -0
- base_aux/base_values/m4_primitives.py +672 -0
- base_aux/base_values/m5_value_valid1_eq.py +142 -0
- base_aux/base_values/m5_value_valid2_variants.py +139 -0
- base_aux/base_values/m5_value_valid3_unit.py +296 -0
- base_aux/base_values/m6_operator.py +24 -0
- base_aux/base_values/test_1_explicit.py +27 -0
- base_aux/base_values/test_5_valid1_eq.py +71 -0
- base_aux/base_values/test_5_valid2_variants.py +183 -0
- base_aux/base_values/test_5_valid3_units.py +315 -0
- base_aux/bits/__init__.py +10 -0
- base_aux/bits/m1_bits.py +154 -0
- base_aux/bits/test_1_bits.py +134 -0
- base_aux/breeders/__init__.py +10 -0
- base_aux/breeders/m1_breeder_str1_series.py +105 -0
- base_aux/breeders/m1_breeder_str2_stack.py +182 -0
- base_aux/breeders/m3_table_inst.py +363 -0
- base_aux/breeders/test_1_breeder_str_1_series.py +222 -0
- base_aux/breeders/test_1_breeder_str_2_stack.py +284 -0
- base_aux/breeders/test_3_table_inst.py +395 -0
- base_aux/buses/_PROJECT.py +79 -0
- base_aux/buses/__init__.py +10 -0
- base_aux/buses/_examples.py +24 -0
- base_aux/buses/_explore.py +44 -0
- base_aux/buses/_params_schema.py +145 -0
- base_aux/buses/m0_history.py +132 -0
- base_aux/buses/m1_serial1_client.py +1597 -0
- base_aux/buses/m1_serial2_client_derivatives.py +59 -0
- base_aux/buses/m1_serial3_server.py +499 -0
- base_aux/buses/m2_i2c_client.py +96 -0
- base_aux/buses/test_0_bytes.py +157 -0
- base_aux/buses/test_0_history.py +101 -0
- base_aux/buses/test__adapter_validate.py +78 -0
- base_aux/buses/test__atc_ptb.py +74 -0
- base_aux/buses/test__serial_client__1_shorted.py +405 -0
- base_aux/buses/test__serial_client__2_paired.py +77 -0
- base_aux/buses/test__serial_client__emulated.py +93 -0
- base_aux/buses/test__serial_server.py +294 -0
- base_aux/chains/__init__.py +0 -0
- base_aux/chains/m1_chains.py +50 -0
- base_aux/chains/test_1_chains.py +20 -0
- base_aux/classes/__init__.py +10 -0
- base_aux/classes/m2_middle_group.py +214 -0
- base_aux/classes/test_2_middle_group.py +68 -0
- base_aux/cli/__init__.py +10 -0
- base_aux/cli/_examples.py +69 -0
- base_aux/cli/m1_cli_user.py +331 -0
- base_aux/cli/test_1__cli.py +174 -0
- base_aux/htmls/__init__.py +0 -0
- base_aux/htmls/m1_html_tag.py +129 -0
- base_aux/htmls/test_1_html_tag.py +78 -0
- base_aux/loggers/__init__.py +10 -0
- base_aux/loggers/m1_print.py +76 -0
- base_aux/loggers/m2_logger.py +192 -0
- base_aux/loggers/test_2_logger.py +63 -0
- base_aux/monitors/_)PROJECT.py +76 -0
- base_aux/monitors/__init__.py +0 -0
- base_aux/monitors/_examples.py +71 -0
- base_aux/monitors/_test__monitors.py +56 -0
- base_aux/monitors/m1_imap.py +204 -0
- base_aux/monitors/m2_url_tag.py +233 -0
- base_aux/monitors/m2_url_tag2__derivatives.py +235 -0
- base_aux/numbers/__init__.py +0 -0
- base_aux/numbers/m1_arithm.py +273 -0
- base_aux/numbers/m2_num_single_parsed.py +37 -0
- base_aux/numbers/test_1_arithm.py +147 -0
- base_aux/numbers/test_2_num_parsed.py +34 -0
- base_aux/path0_static/__init__.py +0 -0
- base_aux/path0_static/m1_file_extensions.py +99 -0
- base_aux/path1_dir/__init__.py +0 -0
- base_aux/path1_dir/m1_dirpath.py +49 -0
- base_aux/path1_dir/m2_dir.py +184 -0
- base_aux/path1_dir/test_1_dirpath.py +40 -0
- base_aux/path2_file/__init__.py +10 -0
- base_aux/path2_file/m1_filepath.py +136 -0
- base_aux/path2_file/m2_file.py +91 -0
- base_aux/path2_file/m3_filetext.py +37 -0
- base_aux/path2_file/m4_fileattrs.py +87 -0
- base_aux/path2_file/test_1_filepath.py +184 -0
- base_aux/path2_file/test_3_filetext.py +51 -0
- base_aux/path2_file/test_4_fileattrs.py +141 -0
- base_aux/privates/__init__.py +0 -0
- base_aux/privates/m1_privates.py +72 -0
- base_aux/privates/m2_env.py +55 -0
- base_aux/pyqt/__init__.py +10 -0
- base_aux/pyqt/_explore.py +17 -0
- base_aux/pyqt/_explore_fonts.py +32 -0
- base_aux/pyqt/m0_base.py +37 -0
- base_aux/pyqt/m0_base1_hl.py +366 -0
- base_aux/pyqt/m0_base2_th.py +88 -0
- base_aux/pyqt/m0_signals.py +35 -0
- base_aux/pyqt/m0_static.py +43 -0
- base_aux/pyqt/m1_dialog.py +887 -0
- base_aux/pyqt/m2_mods.py +133 -0
- base_aux/pyqt/m3_tm.py +332 -0
- base_aux/pyqt/m4_gui.py +1039 -0
- base_aux/pyqt/test_0__signals.py +218 -0
- base_aux/pyqt/test_4__gui.py +33 -0
- base_aux/release/__init__.py +0 -0
- base_aux/release/release_files.py +373 -0
- base_aux/release/step-3__requirements__upgrade-1=full.py +45 -0
- base_aux/servers/_PROJECT.py +55 -0
- base_aux/servers/__init__.py +10 -0
- base_aux/servers/_examples.py +6 -0
- base_aux/servers/m0_url.py +65 -0
- base_aux/servers/m1_client_requests.py +226 -0
- base_aux/servers/m2_server1_aiohttp.py +259 -0
- base_aux/servers/m3_server2_fastapi.py +645 -0
- base_aux/servers/test_0_url.py +43 -0
- base_aux/servers/test_1_client.py +204 -0
- base_aux/servers/test_2_server_aiohttp.py +112 -0
- base_aux/servers/test_3_server_fastapi.py +46 -0
- base_aux/stock/__init__.py +0 -0
- base_aux/stock/_get_data.py +17 -0
- base_aux/stock/_share-5=requirements__upgrade-1=full.py +45 -0
- base_aux/stock/_test_2_mt.py +204 -0
- base_aux/stock/m0_symbols.py +99 -0
- base_aux/stock/m1_mt.py +593 -0
- base_aux/stock/m2_strategy.py +304 -0
- base_aux/stock/start.py +16 -0
- base_aux/systems/__init__.py +10 -0
- base_aux/systems/_gitManager.py +175 -0
- base_aux/systems/m1_git.py +267 -0
- base_aux/systems/test_1_git.py +18 -0
- base_aux/test__init_tests.py +10 -0
- base_aux/testplans/TESTPLANS/DEVICES/__init__.py +0 -0
- base_aux/testplans/TESTPLANS/DEVICES/atc.py +53 -0
- base_aux/testplans/TESTPLANS/DEVICES/dev_lines.py +55 -0
- base_aux/testplans/TESTPLANS/DEVICES/ptb.py +58 -0
- base_aux/testplans/TESTPLANS/Example/__init__.py +0 -0
- base_aux/testplans/TESTPLANS/Example/tc01_exist1_ptb.py +36 -0
- base_aux/testplans/TESTPLANS/Example/tc01_exist2_psu.py +23 -0
- base_aux/testplans/TESTPLANS/Example/tc0_groups.py +18 -0
- base_aux/testplans/TESTPLANS/Example/tc0_test_tcinst_startup_fail.py +17 -0
- base_aux/testplans/TESTPLANS/Example/tc1_direct.py +30 -0
- base_aux/testplans/TESTPLANS/Example/tc2_reverse.py +30 -0
- base_aux/testplans/TESTPLANS/Example/tc3_atc.py +38 -0
- base_aux/testplans/TESTPLANS/Example/tc4_dut_ptb.py +42 -0
- base_aux/testplans/TESTPLANS/Example/tc5_group_1.py +20 -0
- base_aux/testplans/TESTPLANS/Example/tc5_group_2.py +20 -0
- base_aux/testplans/TESTPLANS/Example/tc5_group_3.py +20 -0
- base_aux/testplans/TESTPLANS/Example/tc6_fail_teardown_cls.py +23 -0
- base_aux/testplans/TESTPLANS/Example/tc7_last.py +11 -0
- base_aux/testplans/TESTPLANS/__init__.py +7 -0
- base_aux/testplans/TESTPLANS/psu800/__init__.py +0 -0
- base_aux/testplans/TESTPLANS/psu800/_gen_results.py +110 -0
- base_aux/testplans/TESTPLANS/psu800/tc0__base.py +339 -0
- base_aux/testplans/TESTPLANS/psu800/tc1_none_1_exist_psu.py +26 -0
- base_aux/testplans/TESTPLANS/psu800/tc1_none_2_test_gnd.py +31 -0
- base_aux/testplans/TESTPLANS/psu800/tc1_none_3_off.py +16 -0
- base_aux/testplans/TESTPLANS/psu800/tc1_none_4_on.py +16 -0
- base_aux/testplans/TESTPLANS/psu800/tc2_ext_1_test_pmbus.py +31 -0
- base_aux/testplans/TESTPLANS/psu800/tc2_ext_2_off.py +16 -0
- base_aux/testplans/TESTPLANS/psu800/tc2_ext_3_on.py +16 -0
- base_aux/testplans/TESTPLANS/psu800/tc3_hv_1_off.py +16 -0
- base_aux/testplans/TESTPLANS/psu800/tc3_hv_2_on.py +16 -0
- base_aux/testplans/TESTPLANS/psu800/tc4_hv_1_test_SC12S.py +44 -0
- base_aux/testplans/TESTPLANS/psu800/tc4_hv_2_test_SC12M.py +44 -0
- base_aux/testplans/TESTPLANS/psu800/tc4_hv_3_test_LD12S.py +44 -0
- base_aux/testplans/TESTPLANS/psu800/tc4_hv_4_test_LOAD.py +78 -0
- base_aux/testplans/TESTPLANS/psu800/tc8_hv1_150_off.py +16 -0
- base_aux/testplans/TESTPLANS/psu800/tc8_hv2_160_on.py +16 -0
- base_aux/testplans/TESTPLANS/psu800/tc8_hv3_250_on.py +16 -0
- base_aux/testplans/TESTPLANS/psu800/tc8_hv4_260_off.py +16 -0
- base_aux/testplans/TESTPLANS/stands.py +94 -0
- base_aux/testplans/__init__.py +0 -0
- base_aux/testplans/_explore.py +112 -0
- base_aux/testplans/_results.py +33 -0
- base_aux/testplans/api.py +107 -0
- base_aux/testplans/devices_base.py +174 -0
- base_aux/testplans/devices_kit.py +39 -0
- base_aux/testplans/dialogs.py +85 -0
- base_aux/testplans/gui.py +542 -0
- base_aux/testplans/models.py +62 -0
- base_aux/testplans/stand.py +524 -0
- base_aux/testplans/tc.py +473 -0
- base_aux/testplans/tc_types.py +12 -0
- base_aux/testplans/test__devices.py +168 -0
- base_aux/testplans/test__tc.py +97 -0
- base_aux/testplans/test__tp.py +46 -0
- base_aux/testplans/tm__devs.py +159 -0
- base_aux/testplans/tm__tcs.py +443 -0
- base_aux/testplans/tp_manager.py +266 -0
- base_aux/translator/__init__.py +0 -0
- base_aux/translator/m1_translator.py +63 -0
- base_aux/translator/test_1__translator.py +35 -0
- base_aux/valid/__init__.py +10 -0
- base_aux/valid/_explore.py +30 -0
- base_aux/valid/m1_valid_base.py +360 -0
- base_aux/valid/m2_valid_derivatives.py +81 -0
- base_aux/valid/m3_valid_chains.py +110 -0
- base_aux/valid/test_1__valid_1_base.py +282 -0
- base_aux/valid/test_3__valid_2_chains.py +129 -0
- base_aux/versions/__init__.py +0 -0
- base_aux/versions/m1_block.py +165 -0
- base_aux/versions/m2_version.py +238 -0
- base_aux/versions/m3_derivatives.py +17 -0
- base_aux/versions/test_1_version_block.py +85 -0
- base_aux/versions/test_2_version.py +133 -0
- base_aux/versions/test_3_derivatives.py +56 -0
- base_aux-0.3.11.dist-info/LICENSE +22 -0
- base_aux-0.3.11.dist-info/LICENSE_bundled.md +365 -0
- base_aux-0.3.11.dist-info/METADATA +97 -0
- base_aux-0.3.11.dist-info/RECORD +402 -0
- base_aux-0.3.11.dist-info/WHEEL +5 -0
- base_aux-0.3.11.dist-info/top_level.txt +1 -0
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
from base_aux.base_types.m2_info import ObjectInfo
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
series_a = pd.DataFrame([1, 2, 3])
|
|
6
|
+
print(type(series_a)) # <class 'pandas.core.series.Series'>
|
|
7
|
+
# ObjectInfo(series_a).print()
|
|
8
|
+
|
|
9
|
+
# print(series_a)
|
|
10
|
+
"""
|
|
11
|
+
a NaN
|
|
12
|
+
b 6.0
|
|
13
|
+
c 8.0
|
|
14
|
+
d NaN
|
|
15
|
+
dtype: float64
|
|
16
|
+
"""
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import pathlib
|
|
2
|
+
from typing import *
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
# =====================================================================================================================
|
|
6
|
+
TYPE__EXAMPLE = Union[str, Any]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# =====================================================================================================================
|
|
10
|
+
class NEW_CLASS____:
|
|
11
|
+
"""
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
|
|
15
|
+
GOAL
|
|
16
|
+
----
|
|
17
|
+
|
|
18
|
+
USEFUL IDEAS
|
|
19
|
+
------------
|
|
20
|
+
|
|
21
|
+
CREATED SPECIALLY FOR
|
|
22
|
+
---------------------
|
|
23
|
+
REPLACE:
|
|
24
|
+
|
|
25
|
+
CONSTRAINTS
|
|
26
|
+
-----------
|
|
27
|
+
|
|
28
|
+
BEST USAGE
|
|
29
|
+
----------
|
|
30
|
+
|
|
31
|
+
SAME AS/OTHER VARIANTS
|
|
32
|
+
----------------------
|
|
33
|
+
DIFFERENCE:
|
|
34
|
+
|
|
35
|
+
WHY NOT: 1?
|
|
36
|
+
----------
|
|
37
|
+
|
|
38
|
+
WHY NOT: 2?
|
|
39
|
+
----------
|
|
40
|
+
|
|
41
|
+
REFERENCE
|
|
42
|
+
---------
|
|
43
|
+
|
|
44
|
+
REASON EXAMPLE
|
|
45
|
+
--------------
|
|
46
|
+
|
|
47
|
+
"""
|
|
48
|
+
def meth(self):
|
|
49
|
+
"""
|
|
50
|
+
CREATED SPECIALLY FOR
|
|
51
|
+
---------------------
|
|
52
|
+
"""
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# =====================================================================================================================
|
|
57
|
+
if __name__ == '__main__':
|
|
58
|
+
pass
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# =====================================================================================================================
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from base_aux.base_lambdas.m1_lambda import *
|
|
2
|
+
from base_aux.base_nest_dunders.m7_cmp import *
|
|
3
|
+
import operator
|
|
4
|
+
|
|
5
|
+
# =====================================================================================================================
|
|
6
|
+
class Victim(NestCmp_GLET_DigitAccuracy):
|
|
7
|
+
def __init__(self, source: float | int, **kwargs):
|
|
8
|
+
self.SOURCE = source
|
|
9
|
+
super().__init__(**kwargs)
|
|
10
|
+
|
|
11
|
+
@property
|
|
12
|
+
def CMP_VALUE(self) -> TYPING.DIGIT_FLOAT_INT:
|
|
13
|
+
return self.SOURCE
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# =====================================================================================================================
|
|
17
|
+
class Test_CmpDigit:
|
|
18
|
+
@pytest.mark.parametrize(
|
|
19
|
+
argnames="source, accuracy_value, other, _EXPECTED",
|
|
20
|
+
argvalues=[
|
|
21
|
+
(1, None, 1, (True, False, True, False)),
|
|
22
|
+
(1, None, "hello", (Exception, Exception, Exception, Exception)),
|
|
23
|
+
]
|
|
24
|
+
)
|
|
25
|
+
def test__cmp_glet(
|
|
26
|
+
self,
|
|
27
|
+
source: float | int,
|
|
28
|
+
accuracy: float | None,
|
|
29
|
+
other: float | int,
|
|
30
|
+
_EXPECTED: bool | Exception,
|
|
31
|
+
):
|
|
32
|
+
# -----------------------------------------------
|
|
33
|
+
victim = Victim(source=source, cmp_accuracy_value=accuracy)
|
|
34
|
+
|
|
35
|
+
Lambda(victim.cmp_ge, other=other).check_expected__assert(_EXPECTED[0])
|
|
36
|
+
Lambda(victim.cmp_gt, other=other).check_expected__assert(_EXPECTED[1])
|
|
37
|
+
Lambda(victim.cmp_le, other=other).check_expected__assert(_EXPECTED[2])
|
|
38
|
+
Lambda(victim.cmp_lt, other=other).check_expected__assert(_EXPECTED[3])
|
|
39
|
+
|
|
40
|
+
# -----------------------------------------------
|
|
41
|
+
victim = Victim(source=source)
|
|
42
|
+
|
|
43
|
+
Lambda(victim.cmp_ge, other=other, accuracy=accuracy).check_expected__assert(_EXPECTED[0])
|
|
44
|
+
Lambda(victim.cmp_gt, other=other, accuracy=accuracy).check_expected__assert(_EXPECTED[1])
|
|
45
|
+
Lambda(victim.cmp_le, other=other, accuracy=accuracy).check_expected__assert(_EXPECTED[2])
|
|
46
|
+
Lambda(victim.cmp_lt, other=other, accuracy=accuracy).check_expected__assert(_EXPECTED[3])
|
|
47
|
+
|
|
48
|
+
# -----------------------------------------------
|
|
49
|
+
victim = Victim(source=source, cmp_accuracy_value=accuracy)
|
|
50
|
+
|
|
51
|
+
Lambda(victim.cmp_ge, other=other, accuracy=accuracy).check_expected__assert(_EXPECTED[0])
|
|
52
|
+
Lambda(victim.cmp_gt, other=other, accuracy=accuracy).check_expected__assert(_EXPECTED[1])
|
|
53
|
+
Lambda(victim.cmp_le, other=other, accuracy=accuracy).check_expected__assert(_EXPECTED[2])
|
|
54
|
+
Lambda(victim.cmp_lt, other=other, accuracy=accuracy).check_expected__assert(_EXPECTED[3])
|
|
55
|
+
|
|
56
|
+
# -----------------------------------------------
|
|
57
|
+
# try: # NOTE: USE OPERATOR instead!!!
|
|
58
|
+
# result = victim >= other
|
|
59
|
+
# except Exception as exc:
|
|
60
|
+
# TypeAux(exc).check__subclassed_or_isinst__from_cls_or_inst(_EXPECTED[0])
|
|
61
|
+
# else:
|
|
62
|
+
# assert result is _EXPECTED[0]
|
|
63
|
+
|
|
64
|
+
victim = Victim(source=source, cmp_accuracy_value=accuracy)
|
|
65
|
+
|
|
66
|
+
Lambda(operator.ge, victim, other).check_expected__assert(_EXPECTED[0])
|
|
67
|
+
Lambda(operator.gt, victim, other).check_expected__assert(_EXPECTED[1])
|
|
68
|
+
Lambda(operator.le, victim, other).check_expected__assert(_EXPECTED[2])
|
|
69
|
+
Lambda(operator.lt, victim, other).check_expected__assert(_EXPECTED[3])
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
# =====================================================================================================================
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from typing import *
|
|
2
|
+
import pytest
|
|
3
|
+
from pytest import mark
|
|
4
|
+
|
|
5
|
+
from base_aux.base_lambdas.m1_lambda import *
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# =====================================================================================================================
|
|
9
|
+
def func_example(arg1: Any, arg2: Any) -> str:
|
|
10
|
+
return f"{arg1}{arg2}"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# =====================================================================================================================
|
|
14
|
+
@pytest.mark.parametrize(argnames="func_link", argvalues=[int, float])
|
|
15
|
+
@pytest.mark.parametrize(
|
|
16
|
+
argnames="args, _EXPECTED",
|
|
17
|
+
argvalues=[
|
|
18
|
+
(("1", ), 1),
|
|
19
|
+
(("hello", ), Exception),
|
|
20
|
+
]
|
|
21
|
+
)
|
|
22
|
+
def test__short_variant(func_link, args, _EXPECTED):
|
|
23
|
+
Lambda(func_link, args).check_expected__assert(_EXPECTED)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# =====================================================================================================================
|
|
27
|
+
@pytest.mark.parametrize(
|
|
28
|
+
argnames="args, kwargs, _EXPECTED, _MARK, _COMMENT",
|
|
29
|
+
argvalues=[
|
|
30
|
+
# TRIVIAL -------------
|
|
31
|
+
((1, None), {}, "1None", None, "ok"),
|
|
32
|
+
((1, 2), {}, "12", None, "ok"),
|
|
33
|
+
|
|
34
|
+
# LIST -----------------
|
|
35
|
+
((1, []), {}, "1[]", None, "ok"),
|
|
36
|
+
|
|
37
|
+
# MARKS -----------------
|
|
38
|
+
((1, 2), {}, None, mark.skip, "skip"),
|
|
39
|
+
((1, 2), {}, None, mark.skipif(True), "skip"),
|
|
40
|
+
((1, 2), {}, "12", mark.skipif(False), "ok"),
|
|
41
|
+
((1, 2), {}, None, mark.xfail, "ok"),
|
|
42
|
+
# ((1, 2), {}, "12", mark.xfail, "SHOULD BE FAIL!"),
|
|
43
|
+
]
|
|
44
|
+
)
|
|
45
|
+
@pytest.mark.parametrize(argnames="func_link", argvalues=[func_example, ])
|
|
46
|
+
def test__long_variant(func_link, args, kwargs, _EXPECTED, _MARK, _COMMENT):
|
|
47
|
+
Lambda(func_link, args, kwargs).check_expected__assert(_EXPECTED, _MARK, _COMMENT)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
# =====================================================================================================================
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from base_aux.base_lambdas.m1_lambda import *
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# =====================================================================================================================
|
|
7
|
+
class Test__New:
|
|
8
|
+
# Victim: type[NEW_CLASS____]
|
|
9
|
+
# victim: NEW_CLASS____
|
|
10
|
+
|
|
11
|
+
@classmethod
|
|
12
|
+
def setup_class(cls):
|
|
13
|
+
pass
|
|
14
|
+
# cls.Victim = type("VICTIM", (NEW_CLASS____,), {})
|
|
15
|
+
|
|
16
|
+
@classmethod
|
|
17
|
+
def teardown_class(cls):
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
def setup_method(self, method):
|
|
21
|
+
pass
|
|
22
|
+
|
|
23
|
+
def teardown_method(self, method):
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
# -----------------------------------------------------------------------------------------------------------------
|
|
27
|
+
def test__1_direct(self):
|
|
28
|
+
assert True
|
|
29
|
+
|
|
30
|
+
# -----------------------------------------------------------------------------------------------------------------
|
|
31
|
+
@pytest.mark.parametrize(
|
|
32
|
+
argnames="args, _EXPECTED",
|
|
33
|
+
argvalues=[
|
|
34
|
+
(("1",), 1),
|
|
35
|
+
(("hello",), Exception),
|
|
36
|
+
]
|
|
37
|
+
)
|
|
38
|
+
def test__2_parametrized_by_one_func(self, args, _EXPECTED):
|
|
39
|
+
Lambda(int, args).check_expected__assert(_EXPECTED)
|
|
40
|
+
|
|
41
|
+
# -----------------------------------------------------------------------------------------------------------------
|
|
42
|
+
@pytest.mark.parametrize(argnames="func_link", argvalues=[int, float, ])
|
|
43
|
+
@pytest.mark.parametrize(
|
|
44
|
+
argnames="args, _EXPECTED",
|
|
45
|
+
argvalues=[
|
|
46
|
+
(("1",), 1),
|
|
47
|
+
(("hello",), Exception),
|
|
48
|
+
]
|
|
49
|
+
)
|
|
50
|
+
def test__3_parametrized_by_several_funcs(self, func_link, args, _EXPECTED):
|
|
51
|
+
Lambda(func_link, args).check_expected__assert(_EXPECTED)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# =====================================================================================================================
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from typing import *
|
|
2
|
+
import pytest
|
|
3
|
+
import asyncio
|
|
4
|
+
from pytest import mark
|
|
5
|
+
|
|
6
|
+
from base_aux.base_lambdas.m1_lambda import *
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# =====================================================================================================================
|
|
10
|
+
@pytest.mark.asyncio
|
|
11
|
+
@pytest.mark.parametrize(
|
|
12
|
+
argnames="func_link, args, _EXPECTED",
|
|
13
|
+
argvalues=[
|
|
14
|
+
(asyncio.sleep, (0.1, 1), 1),
|
|
15
|
+
(asyncio.sleep, ("hello",), TypeError),
|
|
16
|
+
]
|
|
17
|
+
)
|
|
18
|
+
async def test__aio(func_link, args, _EXPECTED):
|
|
19
|
+
try:
|
|
20
|
+
result = await func_link(*args)
|
|
21
|
+
except BaseException as exc:
|
|
22
|
+
result = type(exc)
|
|
23
|
+
|
|
24
|
+
assert result == _EXPECTED
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
Testing started at 18:19 ...
|
|
28
|
+
Launching pytest with arguments test0_tasks1_cm.py::test__aio --no-header --no-summary -q in C:\__STARICHENKO_Element\PROJECTS\abc=aio_testplan\aio_tp2
|
|
29
|
+
|
|
30
|
+
============================= test session starts =============================
|
|
31
|
+
collecting ... collected 2 items
|
|
32
|
+
|
|
33
|
+
test0_tasks1_cm.py::test__aio[sleep-args0-1]
|
|
34
|
+
test0_tasks1_cm.py::test__aio[sleep-args1-TypeError]
|
|
35
|
+
|
|
36
|
+
============================== 2 passed in 0.16s ==============================
|
|
37
|
+
PASSED [ 50%]PASSED [100%]sys:1: RuntimeWarning: coroutine 'sleep' was never awaited
|
|
38
|
+
|
|
39
|
+
Process finished with exit code 0
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
# =====================================================================================================================
|
base_aux/__init__.py
ADDED
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# =====================================================================================================================
|
|
2
|
+
class PROJECT:
|
|
3
|
+
KEYWORDS: list[str] = [
|
|
4
|
+
"alerts", "notifications",
|
|
5
|
+
"email alerts", "smtp", "mail", "email",
|
|
6
|
+
"telegram alerts", "telegram",
|
|
7
|
+
]
|
|
8
|
+
DESCRIPTION_SHORT: str = "All abilities (mail/telegram) to send alert msgs (threading)"
|
|
9
|
+
FEATURES: list[str] = [
|
|
10
|
+
["send alert msgs", "emails", "telegram", ],
|
|
11
|
+
"threading",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
# HISTORY -----------------------------------------------
|
|
15
|
+
TODO: list[str] = [
|
|
16
|
+
"test multyStart by one object (QThread)"
|
|
17
|
+
]
|
|
18
|
+
FIXME: list[str] = [
|
|
19
|
+
"NEED SOLVE ABILITY to work without PV.FILE!!! as just a http client"
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# =====================================================================================================================
|
|
File without changes
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# =========================================================================================
|
|
2
|
+
### 0. BEST PRACTICE
|
|
3
|
+
from base_aux.alerts.m2_select import *
|
|
4
|
+
from base_aux.alerts.m1_alerts1_smtp import *
|
|
5
|
+
from base_aux.alerts.m1_alerts2_telegram import *
|
|
6
|
+
from base_aux.aux_attr.m4_kits import AttrKit_AddrPort
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AlertADX(AlertSelect.TELEGRAM_DEF):
|
|
10
|
+
pass
|
|
11
|
+
|
|
12
|
+
AlertADX("hello")
|
|
13
|
+
AlertADX("World")
|
|
14
|
+
AlertADX.threads_wait_all()
|
|
15
|
+
|
|
16
|
+
# =========================================================================================
|
|
17
|
+
# =========================================================================================
|
|
18
|
+
# =========================================================================================
|
|
19
|
+
### AlertSmtp
|
|
20
|
+
#### 1. add new server if not exists
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class SmtpServersMOD(SmtpServers):
|
|
24
|
+
EXAMPLE_RU: AttrKit_AddrPort = AttrKit_AddrPort("smtp.EXAMPLE.ru", 123)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class AlertSmtpMOD(AlertSmtp):
|
|
28
|
+
CONN_ADDRESS: AttrKit_AddrPort = SmtpServersMOD.EXAMPLE_RU # or direct =AttrKit_AddrPort("smtp.EXAMPLE.ru", 123)
|
|
29
|
+
|
|
30
|
+
# =========================================================================================
|
|
31
|
+
#### 2. change authorisation data (see `privates` for details)
|
|
32
|
+
from base_aux.privates.m1_privates import *
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class AlertSmtpMOD(AlertSmtp):
|
|
36
|
+
CONN_AUTH: AttrKit_AuthNamePwd = PvLoaderIni(target=AttrKit_AuthNamePwd, keypath=("AUTH_EMAIL_MOD",))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# =========================================================================================
|
|
40
|
+
#### 3. change other settings (see source for other not mentioned)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class AlertSmtpMOD(AlertSmtp):
|
|
44
|
+
RECONNECT_PAUSE: int = 60
|
|
45
|
+
RECONNECT_LIMIT: int = 10
|
|
46
|
+
TIMEOUT_RATELIMIT: int = 600
|
|
47
|
+
RECIPIENT: str = "my_address_2@mail.ru"
|
|
48
|
+
|
|
49
|
+
# =========================================================================================
|
|
50
|
+
#### 4. send
|
|
51
|
+
# if no mods
|
|
52
|
+
|
|
53
|
+
AlertSmtp(_subj_name="Hello", body="World!")
|
|
54
|
+
|
|
55
|
+
# with mods
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class AlertSmtpMOD(AlertSmtp):
|
|
59
|
+
pass # changed
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
AlertSmtpMOD(_subj_name="Hello", body="World!")
|
|
63
|
+
|
|
64
|
+
# =========================================================================================
|
|
65
|
+
#### 5. using in class with saving alert object
|
|
66
|
+
|
|
67
|
+
class AlertSmtpMOD(AlertSmtp):
|
|
68
|
+
pass # changed
|
|
69
|
+
|
|
70
|
+
class MyMonitor:
|
|
71
|
+
ALERT = AlertSmtpMOD
|
|
72
|
+
|
|
73
|
+
monitor = MyMonitor()
|
|
74
|
+
monitor.ALERT("Hello")
|
|
75
|
+
|
|
76
|
+
# =========================================================================================
|
|
77
|
+
# =========================================================================================
|
|
78
|
+
### AlertTelegram
|
|
79
|
+
# All idea is similar to AlertSmtp.
|
|
80
|
+
|
|
81
|
+
# add auth data
|
|
82
|
+
# add pv.json or do smth else (for details see privates.PrivateJsonTgBotAddress)
|
|
83
|
+
# json
|
|
84
|
+
{
|
|
85
|
+
"TG_ID": {"MyTgID": 1234567890},
|
|
86
|
+
"TGBOT_DEF": {
|
|
87
|
+
"LINK_ID": "@my_bot_20230916",
|
|
88
|
+
"NAME": "my_bot",
|
|
89
|
+
"TOKEN": "9876543210xxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
# =========================================================================================
|
|
94
|
+
|
|
95
|
+
class MyMonitor:
|
|
96
|
+
ALERT = AlertTelegram
|
|
97
|
+
|
|
98
|
+
monitor = MyMonitor()
|
|
99
|
+
monitor.ALERT("Hello")
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
from base_aux.alerts.m1_alerts1_smtp import *
|
|
2
|
+
from base_aux.alerts.m1_alerts2_telegram import *
|
|
3
|
+
from base_aux.base_lambdas.m1_lambda import *
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# =====================================================================================================================
|
|
7
|
+
# TODO: separate by base class and use victimCls as attr!
|
|
8
|
+
|
|
9
|
+
@pytest.mark.skip
|
|
10
|
+
@pytest.mark.skipif(Lambda(AlertSmtp.CONN_AUTH).check_raised__bool(), reason="no file")
|
|
11
|
+
class Test__1:
|
|
12
|
+
@pytest.mark.parametrize(argnames="cls", argvalues=[
|
|
13
|
+
AlertSmtp,
|
|
14
|
+
AlertTelegram,
|
|
15
|
+
])
|
|
16
|
+
def test__send_single(self, cls):
|
|
17
|
+
victim = cls()
|
|
18
|
+
victim.send_msg("single")
|
|
19
|
+
assert victim.wait()
|
|
20
|
+
|
|
21
|
+
@pytest.mark.parametrize(argnames="victim", argvalues=[
|
|
22
|
+
# AlertSmtp,
|
|
23
|
+
# AlertTelegram,
|
|
24
|
+
])
|
|
25
|
+
@pytest.mark.parametrize(argnames="subject, msg, _subtype", argvalues=[
|
|
26
|
+
(None, "zero", None),
|
|
27
|
+
("", "plain123", "plain123"),
|
|
28
|
+
("plain", "plain", "plain"),
|
|
29
|
+
("html", "<p><font color='red'>html(red)</font></p>", "html")
|
|
30
|
+
])
|
|
31
|
+
def test__send_single__parametrized(self, victim, subject, msg, _subtype):
|
|
32
|
+
victim = victim()
|
|
33
|
+
victim.send_msg(subject=subject, body=msg, _subtype=_subtype)
|
|
34
|
+
assert victim.result_sent_all is not True
|
|
35
|
+
victim.wait()
|
|
36
|
+
assert victim.result_sent_all is True
|
|
37
|
+
|
|
38
|
+
@pytest.mark.parametrize(argnames="victim", argvalues=[
|
|
39
|
+
AlertSmtp,
|
|
40
|
+
# AlertTelegram
|
|
41
|
+
])
|
|
42
|
+
def test__send_multy__result_wait(self, victim):
|
|
43
|
+
pass
|
|
44
|
+
# assert victim("multy1").wait() is True
|
|
45
|
+
# assert victim("multy2").wait() is True
|
|
46
|
+
|
|
47
|
+
@pytest.mark.parametrize(argnames="victim", argvalues=[
|
|
48
|
+
AlertSmtp,
|
|
49
|
+
# AlertTelegram
|
|
50
|
+
])
|
|
51
|
+
def test__send_multy__wait_join(self, victim):
|
|
52
|
+
return
|
|
53
|
+
|
|
54
|
+
thread1 = victim("thread1")
|
|
55
|
+
thread2 = victim("thread2")
|
|
56
|
+
|
|
57
|
+
thread1.wait()
|
|
58
|
+
thread2.wait()
|
|
59
|
+
|
|
60
|
+
assert thread1._result is True
|
|
61
|
+
assert thread2._result is True
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# =====================================================================================================================
|
|
65
|
+
# class Test_AlertHttp:
|
|
66
|
+
# Victim = AlertHttp
|
|
67
|
+
# def test__send_single(self, victim):
|
|
68
|
+
# assert self.Victim({}).result_wait() is True
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# =====================================================================================================================
|