Orchestrata Ultimate › Tests › Reference › test_orchestrata_tools_testgen_conditions_coverage

Tests reference — tests/test_orchestrata_tools_testgen_conditions_coverage.py

Module of tests, split out because the directory page would be too large.

Prose pending.

tests/test_orchestrata_tools_testgen_conditions_coverage.py

source · 78 tests · 627 lines

Coverage-completing unit tests for

Kind Name Line Description
function test_condition_inputs_is_a_dataclass_with_expected_fields 53
function test_analyse_empty_condition_returns_empty 66
function test_analyse_syntax_error_returns_empty 74
function test_analyse_is_none 81
function test_analyse_not_negates_inner 88
function test_analyse_is_none_attribute_left_skips_input_mapping 96
function test_analyse_is_not_none 102
function test_analyse_is_not_none_attribute_left_skips_input_mapping 109
function test_analyse_is_non_none_constant_falls_through_to_empty 115 x is True parses to an Is comparison whose comparator is a
function test_analyse_is_name_comparator_falls_through_to_empty 124 x is y — the comparator isn't a Constant at all, so the guard
function test_analyse_is_not_name_comparator_falls_through_to_empty 132
function test_analyse_eq_int 138
function test_analyse_eq_negative_int 145
function test_analyse_eq_name_rhs_uses_unparsed_repr 151 x == y — the RHS is a Name, not a constant: _const_repr
function test_analyse_noteq_int 160
function test_analyse_eq_bool_true 167
function test_analyse_eq_bool_false 173
function test_analyse_eq_none_uses_sentinel_for_other 179
function test_analyse_eq_string 185
function test_analyse_eq_float_other_falls_back_to_sentinel 191 A non-int constant that also isn't 0/True/False/None/string ('3.14')
function test_analyse_eq_attribute_left_skips_input_mapping 199
function test_analyse_noteq_attribute_left_skips_input_mapping 205
function test_analyse_lt 211
function test_analyse_lte 218
function test_analyse_gt 225
function test_analyse_gte 232
function test_analyse_lt_float_rhs 239 A float RHS ('3.5') can't int-parse, so _comparison_values
function test_analyse_lt_non_numeric_rhs 247 A Name RHS isn't a constant — _comparison_values can't parse a
function test_analyse_lt_attribute_left_skips_input_mapping 255
function test_analyse_in 261
function test_analyse_not_in 269
function test_analyse_in_attribute_left_uses_default_item_value 277 An Attribute LHS has no parameter name — the input maps stay empty
function test_analyse_not_in_attribute_left_uses_default_item_value 286
function test_analyse_isinstance 293
function test_analyse_isinstance_override_type_wins 300 The type in the isinstance call overrides the args-map annotation.
function test_analyse_isinstance_attribute_left_skips_input_mapping 307
function test_analyse_isinstance_wrong_arg_count_falls_through 313
function test_analyse_hasattr 319
function test_analyse_hasattr_wrong_arg_count_falls_through 327
function test_analyse_other_call_falls_through 333
function test_analyse_bare_name_str 339
function test_analyse_bare_name_int 346
function test_analyse_bare_name_float 352
function test_analyse_bare_name_list 358
function test_analyse_bare_name_dict 364
function test_analyse_bare_name_optional 370
function test_analyse_bare_name_bool 376 bool isn't special-cased in _truthy/_falsy — the generic
function test_analyse_bare_name_unannotated 384
function test_analyse_attribute_access 390
function test_analyse_bool_and_names 398
function test_analyse_bool_and_attributes_collect_all_setup 405 Both parts are attribute conditions with empty false_inputs — the
function test_analyse_bool_or_names 416
function test_analyse_bool_or_attributes_collect_all_setup 423
function test_analyse_chained_comparison_falls_through 431 a < b < c has two ops — the single-op Compare guard rejects it
function test_analyse_unrecognised_expression_returns_empty 439
function test_build_ann_map_handles_all_arg_groups 450
function test_build_ann_map_missing_groups_returns_empty 463
function test_name_returns_id_for_name_node 473
function test_name_returns_empty_for_attribute_node 478
function test_name_returns_empty_for_other_nodes 483
function test_const_repr_constant_uses_repr 493
function test_const_repr_unparses_non_constant 498
function test_const_repr_falls_back_to_ellipsis_on_unparse_failure 503
function test_typed_value_override_type_wins 520
function test_typed_value_uses_annotation_map 524
function test_typed_value_missing_annotation_is_none 528
function test_other_value_handles_common_sentinels 537
function test_other_value_non_int_falls_back_to_sentinel 546
function test_comparison_values_int_ops 556
function test_comparison_values_float_rhs_widens_to_float 563
function test_comparison_values_unparseable_uses_not_prefix 567
function test_comparison_values_unrecognised_op_uses_generic_fallback 571
function test_op_str_known_ops 584
function test_op_str_unknown_op_returns_question_mark 593
function test_truthy_variants 602
function test_truthy_falls_back_to_sentinel 610
function test_falsy_variants 616
function test_falsy_optional_and_fallback 624