test_utils¶
s/e.
-
class
iamax.tests.test_utils.TestIMMixin¶ Unit-test counterpart of
IMMixin.-
test_is_jsonable(self, f: bool, i: type, o: bool)¶ s/e.
-
test_is_static_method(self, ı: bool, i: type, o: bool)¶ s/e.
-
test_is_class_method(self, ı: bool, i: type, o: bool)¶ s/e.
-
test_isnt_instance_method(self, ı: bool, i: type, o: bool)¶ s/e.
-
test_method_input_signature(self, i: type, o: bool)¶ s/e.
-
test_items_grouper(self, i: list[tuple[str|int]], j: int|Callable, o: list[tuple[str|int, list[str|int]]])¶ s/e.
-
test_items_grouper_raiser(self)¶ s/e.
-
test_dag_uncycler_raiser(self)¶ s/e.
-
test_dag_uncycler(self, i: dict|dict_items, k: NoneType|str, o: list[type, tuple|dict[tuple, type]])¶ s/e.
-
test_dag_sorter(self, r: bool, i: dict[str, list[str]], o: list[tuple[str, list[str]]])¶ s/e.
-
test_nx_neg_subgrapher(self, es: list[tuple[str, str]], w: list[str], u: list[str], f: bool, o: list[str], t: type)¶ s/e.
-
test_nx_neg_subgrapher_raiser(self)¶ s/e.
-
test_namedtupler(self, i: dict[dict[str, int]])¶ s/e.
-
test_keymap_replacer(self, s: str, d: list)¶ s/e.
-
test_dict_subsetter_only_dict(self, o: type)¶ s/e.
-
test_dict_subsetter_keykeeper(self, i: dict, L: type, o: dict)¶ s/e.
-
test_dict_subsetter_kmodifer(self, i: dict, L: type, o: dict)¶ s/e.
-
test_dict_subsetter_vmodifer(self, i: dict, L: type, o: dict)¶ s/e.
-
test_dict_subsetter_lmodifer(self, i: dict, L: type, o: dict)¶ s/e.
-
test_dict_subsetter_dmodifer(self, i: dict, L: type, o: dict)¶ s/e.
-
test_dict_flattener(self, i: dict, o: dict)¶ s/e.
-
test_asterisk_primacy(self)¶ s/e.
-
test_str_sanitizer(self, i: str, g: bool, o: str)¶ s/e.
-
test_seq_ensurer(self, o: type, t: type)¶ s/e.
-
test_snake_case_frmttr(self, i: str, o: str)¶ s/e.
-
test_seq_coercing_ensurer(self, o: type, t: type)¶ s/e.
-
test_items_coercer(self, i: type, o: type)¶ s/e.
-
test_coords_coercer(self, ridxs: tuple, cidxs: tuple)¶ s/e.
-
test_nd_coords_coercer(self, ridxs: tuple, cidxs: tuple)¶ s/e.
-
test_data_nums_selecter(self, df: pd.DataFrame)¶ s/e.
-
test_data_nums_coercer(self, df: pd.DataFrame)¶ s/e.
-
test_data_stdtyper(self, df: pd.DataFrame)¶ s/e.
-
test_data_keeper_raiser(self, df: pd.DataFrame)¶ s/e.
-
test_ndarrays_tupler(self, i: np.ndarray|list, o: tuple[type|tuple[type]])¶ s/e.
-
test_cartesian_mapper(self, items: list)¶ s/e.
-
test_const_val_dropper(self, df: pd.DataFrame, h: bool, v: bool, z: float or str)¶ s/e.
-
test_meth_try(self)¶ s/e.
-
test_func_try(self)¶ s/e.
-
test_ilevels_args_realigner(self, x: list[tuple[str|int]], y: list[tuple[str|int]], L: None|int, s: bool, a: tuple[str], o: tuple[int|None])¶ s/e.
-
test_coords_deduplicater(self, a: str, k: bool, i: tuple, o: tuple, delim: str = '_', _ker: Callable = lambda e_, e, d: e_.__class__(e[:-(1 + len(d))]) if str(e).endswith(f'{d}1') else e)¶ s/e.
-
test_dspaces_kroneckerizer(self, ixs: tuple[int], jxs: tuple[int], _dfs: tuple = __some_orthog_dfs, _agtr: Callable = opr.attrgetter('index.nlevels'))¶ s/e.
-
test_dspaces_unioner(self, ixs: tuple[int], h: bytes, _dfs: tuple = __some_non_orthog_dfs, _λh: Callable = ut.HshMixin.hash)¶ s/e.
-
test_advanced_indices_merger(self, i: (list|tuple)[tuple[int]], o: tuple[int])¶ s/e.
-
test_ellipsis_tupler(self, c: (list|tuple)[Ellipsis|tuple[int]], i: tuple[tuple[int]], f: bool, s: set[tuple[int]], o: tuple[tuple[int]])¶ s/e.
-
test_tuples_unnester(self, i: tuple[type|tuple[type|tuple[type|tuple[type]]]], o: tuple[type])¶ s/e.
-
test_strict_subclass_superer(self, i: type, o: type)¶ s/e.
-
-
class
iamax.tests.test_utils.TestXMLMixin¶ Unit-test counterpart of
XMLMixin.-
classmethod
setup_class(cls)¶ s/e.
-
classmethod
teardown_class(cls)¶ s/e.
-
test_ranges_to_cells_expliciter(self, i: str, o: tuple)¶ s/e.
-
test_ranges_to_cells_indexer(self, i: str, o: tuple, f_o: bool)¶ s/e.
-
test_archivability_ensurer_txt_behavior(self, ext: str)¶ s/e.
-
test_archivability_ensurer_zip_behavior(self, ext: str)¶ s/e.
-
test_archivability_ensurer_non_nt_behavior(self, ext: str)¶ s/e.
-
test_is_excel_file(self, ext: str, true: bool)¶ s/e.
-
test_xl_file_type_asserter(self, ext: str)¶ s/e.
-
classmethod
-
class
iamax.tests.test_utils.TestHshMixin¶ Unit-test counterpart of
HshMixin.-
test_unsafe_characters_type(self)¶ s/e.
-
test_arrays(self, i: np.ndarray, o: bytes)¶ s/e.
-
test_pd_dataframe(self, i: pd.DataFrame, o: bytes)¶ s/e.
-
test_sequences(self, i: type, o: bytes)¶ s/e.
-
test_safety(self, i: type, o: bytes)¶ s/e.
-
test_str_safety(self, i: type, o: str)¶ s/e.
-
test_blob(self)¶ s/e.
-
-
class
iamax.tests.test_utils.TestCache¶ Unit-test counterpart of
Cache.-
test_property(self, s: None|str)¶ s/e.
-
test_method(self, p: None|Callable, d: bool, s: None|str)¶ s/e.
-
test_defargs_collecter(self, i: Callable, o: dict[str, int])¶ s/e.
-
test_mdefargs_collecter(self, s: str, o: dict[str, int], t: type)¶ s/e.
-
-
class
iamax.tests.test_utils.TestSymer¶ Unit-test counterpart of
Symer.-
classmethod
setup_class(cls)¶ s/e.
-
classmethod
teardown_class(cls)¶ s/e.
-
test_symbols(self, c: type, o: list[str])¶ s/e.
-
test_operands(self, o: list[str], t: dict[str, tuple[str, bool]], c: type)¶ s/e.
-
test_aliased_symbols(self, o: dict[str, str], t: dict[str, tuple[str, bool]], c: type)¶ s/e.
-
test_divf_simplification_and_shape(self, A: _ḭλ, B: _ḭλ)¶ s/e.
-
test_dot_inverse_and_solve_behavior(self, A: _ḭλ, B: _ḭλ, C: _ḭλ, x: _ḭλ, y: _ḭλ)¶ s/e.
-
test_dotm_wrapper_behavior(self, A: _ḭλ, x: _ḭλ, y: _ḭλ)¶ s/e.
-
test_errstate_wrapper_properties(self, A: _ḭλ, B: _ḭλ, _none=sy.Symbol('None'))¶ s/e.
-
test_factorization_idempotence_on_transpose_product(self, h: _ḭλ, M: _ḭλ, _1: _ḭλ)¶ s/e.
-
test_float_and_errstate_replacement_behavior(self, A: _ḭλ, B: _ḭλ)¶ s/e.
-
test_float_wrapper_behavior(self, A: _ḭλ, B: _ḭλ)¶ s/e.
-
test_float_wrapper_transpose_coalescence(self, x: _ḭλ)¶ s/e.
-
test_indexing_shapes_and_replacement(self, T: _ḭλ, A: _ḭλ, B: _ḭλ, x: _ḭλ, u: _ḭλ, î: _ƴλ, j: _ƴλ, ı: _ƴλ)¶ s/e.
-
test_inverse_wrapper_and_transpose_behavior(self, A: _ḭλ, B: _ḭλ)¶ s/e.
-
test_logical_transpose_distribution_over_predicates(self, x: _ḭλ, y: _ḭλ)¶ s/e.
-
test_logical_wrapper_structure(self, A: _ḭλ, B: _ḭλ)¶ s/e.
-
test_nan_to_num_parameters_shape_and_replacement(self, A: _ḭλ, B: _ḭλ)¶ s/e.
-
test_nan_to_num_transpose_and_ravel_canonicalization(self, x: _ḭλ)¶ s/e.
-
test_nested_wrapper_composition_stays_structural(self, x: _ḭλ, y: _ḭλ, î: _ƴλ)¶ s/e.
-
test_numeric_wrapper_sympy_compatibility(self, A: _ḭλ, B: _ḭλ, C: _ḭλ)¶ s/e.
-
test_piecewise_scalar_collapse_and_cond_transpose_normalization(self, x: _ḭλ, y: _ḭλ, p: _ƴλ)¶ s/e.
-
test_piecewise_solve_interop_with_native_sympy(self, T: _ḭλ, U: _ḭλ, V: _ḭλ, p: _ƴλ)¶ s/e.
-
test_piecewise_structure_transpose_and_replacement(self, A: _ḭλ, B: _ḭλ, C: _ḭλ, p: _ƴλ, q: _ƴλ)¶ s/e.
-
test_piecewise_xreplace_completeness(self, A: _ḭλ, p: _ƴλ, q: _ƴλ)¶ s/e.
-
test_pow_boolean_exponent_behavior(self, x: _ḭλ, β: _ƴλ)¶ s/e.
-
test_predicate_wrapper_shapes_and_sympy_compatibility(self, A: _ḭλ, B: _ḭλ)¶ s/e.
s/e.
-
test_real_imag_wrapper_and_solve_behavior(self, A: _ḭλ, B: _ḭλ)¶ s/e.
-
test_relational_operator_dispatch(self, A: _ḭλ, B: _ḭλ, _Ɛ: float = 1e-12)¶ s/e.
-
test_relational_wrapper_completeness(self, A: _ḭλ, B: _ḭλ)¶ s/e.
-
test_round_wrapper_additive_coalescence(self, x: _ḭλ)¶ s/e.
-
test_round_wrapper_and_solve_behavior(self, A: _ḭλ, B: _ḭλ)¶ s/e.
-
test_slice_and_ellipsis_wrapper_behavior(self, A: _ḭλ, ı: _ƴλ, _ns=sy.Symbol('None'))¶ s/e.
-
test_solvef_canonical_linear_system_behavior(self, A: _ḭλ, x: _ḭλ, y: _ḭλ)¶ s/e.
-
test_solvef_shape_and_transpose_behavior(self, A: _ḭλ, x: _ḭλ, y: _ḭλ)¶ s/e.
-
test_solvefor_transpose(self, A: _ḭλ, B: _ḭλ)¶ s/e.
-
test_solvefor_update_ravel(self, A: _ḭλ, B: _ḭλ, C: _ḭλ, î: _ƴλ, j: _ƴλ, k: _ƴλ)¶ s/e.
-
test_solvefor_update_views(self, A: _ḭλ, B: _ḭλ, C: _ḭλ, î: _ƴλ, j: _ƴλ)¶ s/e.
- Example
>>> s = TestSymer() >>> s.setup_class() >>> abc = s._some_2x2_ḭλs[:3] >>> ij = s._some_2x0_iƴλs[:2] >>> s.test_solvefor_update_views(*abc, *ij) >>> s.teardown_class()
-
test_sumf_additive_coalescence(self, T: _ḭλ)¶ s/e.
-
test_sum_axis_shape_validation(self, A: _ḭλ)¶ s/e.
-
test_sum_dispatch_and_shape_inference(self, A: _ḭλ, T: _ḭλ)¶ s/e.
-
test_take_wrapper_shape_solve_and_replacement(self, T: _ḭλ, A: _ḭλ, x: _ḭλ, î: _ƴλ, j: _ƴλ, ı: _ƴλ)¶ s/e.
-
test_take_fields_and_derivative_behavior(self, T: _ḭλ, x: _ḭλ, î: _ƴλ)¶ s/e.
-
test_take_keyword_defaults_and_mode_behavior(self, x: _ḭλ, î: _ƴλ)¶ s/e.
-
test_take_shape_validation(self, T: _ḭλ, A: _ḭλ, î: _ƴλ)¶ s/e.
-
test_take_mode_symbol_hygiene_and_shape_stable_replacement(self, χ: _ƴλ)¶ s/e.
-
test_transpose_involution_and_shape(self, T: _ḭλ, A: _ḭλ)¶ s/e.
-
test_unix_wrapper_diff_and_solve_behavior(self, A: _ḭλ, x: _ḭλ, î: _ƴλ)¶ s/e.
-
test_update_helper_properties(self, A: _ḭλ, B: _ḭλ, î: _ƴλ, j: _ƴλ)¶ s/e.
-
test_update_view_shape_and_reshape_behavior(self, A: _ḭλ, B: _ḭλ, î: _ƴλ, j: _ƴλ)¶ s/e.
-
test_ravel_unravel_roundtrip_and_solve(self, h: _ḭλ, r: _ḭλ)¶ s/e.
-
test_ravel_cache_behavior(self, A: _ḭλ, h: _ḭλ)¶ s/e.
-
classmethod
-
class
iamax.tests.test_utils.TestArchiver¶ Unit-test counterpart of
Archiver.-
classmethod
setup_class(cls)¶ s/e.
-
classmethod
teardown_class(cls)¶ s/e.
-
test_iloc_styles_keys(self, sheet_name: str = 'metaed', cell_coord: tuple = (4, 5))¶ s/e.
-
test_iloc_comments_keys(self, sheet_name: str = 'metaed', cell_coord: tuple = (5, 5))¶ s/e.
-
test_iloc_hyperlinks_keys(self, sheet_name: str = 'metaed', cell_coord: tuple = (4, 5))¶ s/e.
-
classmethod
-
class
iamax.tests.test_utils.TestExoData¶ Unit-test counterpart of
ExoData.-
classmethod
setup_class(cls)¶ s/e.
-
classmethod
teardown_class(cls)¶ s/e.
-
test_file_inexistence_asserter(self)¶ s/e.
-
test_xl_file_type_asserter(self, ext: str)¶ s/e.
-
test_xl_file_getting_raiser(self)¶ s/e.
-
test_xl_obj_attributes(self, e: str)¶ s/e.
-
test_file_or_path_dealer_raiser(self, o: type, e: str)¶ s/e.
-
test_file_or_path_dealer_surjectivity(self, e: str)¶ s/e.
-
test_xl_2dtables_pd_reader(self, mk_exo: type, without_strs: bool, df_in: pd.DataFrame)¶ s/e.
-
test_xl_ndtables_pd_reader(self, shname: str, nlevs_pair: (int, int), dna: bool, max_dim: int = 15)¶ s/e.
-
test_xl_2dtables_raiser(self)¶ s/e.
-
test_xl_ndtables_raiser(self)¶ s/e.
-
classmethod
-
class
iamax.tests.test_utils.TestExoTreeData¶ Unit-test counterpart of
ExoTreeData.-
test_op_cells_unmerger_foutput(self, e: str = 'openpyxl')¶ s/e.
-
test_op_cells_unmerger_inplace(self, e: str = 'openpyxl')¶ s/e.
-
test_xl_ndtrees_to_ndtables_already_unmerged_innocuity(self, e: str = 'openpyxl')¶ s/e.
-
test_level_keys_combiner(self, i: tuple, o: tuple)¶ s/e.
-
test_level_keys_combining_identifier(self)¶ s/e.
-
test_level_keys_combining_raiser(self)¶ s/e.
-
test_level_keys_combiner_wrong_kw(self)¶ s/e.
-
test_nested_edges_maker(self, i: list, o: dict)¶ s/e.
-
test_tree_builder(self, w_data: bool, i: dict, a: dict, d: dict)¶ s/e.
-
test_nested_edges_composer(self, i: dict, o: dict)¶ s/e.
-
test_nested_edges_composing_raiser(self, i: dict)¶ s/e.
-
test_xl_ndtrees_op_reader_notimp_raiser(self)¶ s/e.
-
test_xl_ndtrees_op_reader_unmod_raiser(self)¶ s/e.
-
test_xl_ndtrees_op_reader(self, s: str, h: bytes)¶ s/e.
-