← Về thư mục
📄
/
/
profiles
/
r-and-d
/
raw_evidence
/
scientific-agent-skills
/
graft
/
tests
/
uncertainty-and-units
/ test_scripts.md
tests/uncertainty-and-units/test_scripts.py
tests/uncertainty-and-units/test_scripts.py
_available · function · L38-L45 — def _available(name: str) -> bool
CommonSafetyTests · class · L96-L157 — class CommonSafetyTests(unittest.TestCase)
test_json_output_is_private_and_refuses_overwrite · method · L97-L106 — def test_json_output_is_private_and_refuses_overwrite(self) -> None
test_local_paths_reject_urls_and_symlinks · method · L108-L123 — def test_local_paths_reject_urls_and_symlinks(self) -> None
test_no_shadow_modules_network_or_environment_reads · method · L125-L144 — def test_no_shadow_modules_network_or_environment_reads(self) -> None
test_skill_directory_ships_no_bytecode_or_tests · method · L146-L150 — def test_skill_directory_ships_no_bytecode_or_tests(self) -> None
test_help_is_available_without_running_workflows · method · L152-L157 — def test_help_is_available_without_running_workflows(self) -> None
ExpressionParsingTests · class · L160-L201 — class ExpressionParsingTests(unittest.TestCase)
test_accepts_arithmetic_and_whitelisted_functions · method · L161-L163 — def test_accepts_arithmetic_and_whitelisted_functions(self) -> None
test_rejects_everything_that_is_not_arithmetic · method · L165-L182 — def test_rejects_everything_that_is_not_arithmetic(self) -> None
test_rejects_unbounded_expressions · method · L184-L192 — def test_rejects_unbounded_expressions(self) -> None
test_reduction_uses_supplied_functions_only · method · L194-L201 — def test_reduction_uses_supplied_functions_only(self) -> None
MetrologyMathTests · class · L204-L244 — class MetrologyMathTests(unittest.TestCase)
test_welch_satterthwaite_matches_the_published_formula · method · L205-L209 — def test_welch_satterthwaite_matches_the_published_formula(self) -> None: # Two components of 0.03 with 9 dof each: nu_eff = 4 * 9 / 2 = 18.
test_infinite_degrees_of_freedom_drop_out · method · L211-L216 — def test_infinite_degrees_of_freedom_drop_out(self) -> None
test_coverage_factor_matches_the_normal_limit · method · L218-L219 — def test_coverage_factor_matches_the_normal_limit(self) -> None
test_coverage_factor_follows_the_t_distribution · method · L222-L224 — def test_coverage_factor_follows_the_t_distribution(self) -> None
test_numerical_tolerance_is_half_the_last_retained_digit · method · L226-L230 — def test_numerical_tolerance_is_half_the_last_retained_digit(self) -> None
test_shortest_interval_finds_the_narrowest_window · method · L233-L239 — def test_shortest_interval_finds_the_narrowest_window(self) -> None
test_distribution_divisors_follow_the_gum · method · L241-L244 — def test_distribution_divisors_follow_the_gum(self) -> None
FormatResultTests · class · L247-L319 — class FormatResultTests(unittest.TestCase)
test_value_is_rounded_to_the_uncertainty_decimal_place · method · L248-L252 — def test_value_is_rounded_to_the_uncertainty_decimal_place(self) -> None
test_carrying_uncertainty_recomputes_the_decimal_place · method · L254-L258 — def test_carrying_uncertainty_recomputes_the_decimal_place(self) -> None
test_one_significant_digit_is_honoured · method · L260-L265 — def test_one_significant_digit_is_honoured(self) -> None
test_concise_notation_matches_the_plus_minus_form · method · L267-L273 — def test_concise_notation_matches_the_plus_minus_form(self) -> None
test_digits_left_of_the_point_switch_to_scientific · method · L275-L280 — def test_digits_left_of_the_point_switch_to_scientific(self) -> None
test_extreme_exponents_avoid_a_run_of_zeros · method · L282-L286 — def test_extreme_exponents_avoid_a_run_of_zeros(self) -> None
test_exact_values_are_labelled · method · L288-L292 — def test_exact_values_are_labelled(self) -> None
test_warnings_cover_the_reporting_traps · method · L294-L302 — def test_warnings_cover_the_reporting_traps(self) -> None
test_bad_arguments_are_rejected · method · L304-L310 — def test_bad_arguments_are_rejected(self) -> None
test_statement_names_the_coverage_factor · method · L312-L319 — def test_statement_names_the_coverage_factor(self) -> None
BudgetTests · class · L322-L429 — class BudgetTests(unittest.TestCase)
_spec · method · L323-L345 — def _spec(self) -> dict
test_divisors_follow_the_declared_distribution · method · L347-L364 — def test_divisors_follow_the_declared_distribution(self) -> None
test_relative_components_need_a_measurand_value · method · L366-L374 — def test_relative_components_need_a_measurand_value(self) -> None
test_combined_uncertainty_and_effective_dof · method · L377-L384 — def test_combined_uncertainty_and_effective_dof(self) -> None
test_small_sample_warning_and_type_a_dof_warning · method · L387-L398 — def test_small_sample_warning_and_type_a_dof_warning(self) -> None
test_undivided_type_b_normal_component_is_flagged · method · L401-L410 — def test_undivided_type_b_normal_component_is_flagged(self) -> None
test_report_is_strict_json_and_renders_markdown · method · L413-L419 — def test_report_is_strict_json_and_renders_markdown(self) -> None
test_malformed_specs_are_rejected · method · L421-L429 — def test_malformed_specs_are_rejected(self) -> None
PropagationTests · class · L436-L619 — class PropagationTests(unittest.TestCase)
_framework · method · L437-L442 — def _framework(self, expression: str, variables, correlations=None)
test_linear_model_matches_quadrature · method · L444-L454 — def test_linear_model_matches_quadrature(self) -> None
test_sensitivity_coefficients_are_analytic_partials · method · L456-L468 — def test_sensitivity_coefficients_are_analytic_partials(self) -> None
test_correlation_reduces_the_uncertainty_of_a_difference · method · L470-L481 — def test_correlation_reduces_the_uncertainty_of_a_difference(self) -> None
test_monte_carlo_agrees_with_the_framework_on_a_linear_model · method · L483-L502 — def test_monte_carlo_agrees_with_the_framework_on_a_linear_model(self) -> None
test_nonlinear_model_fails_the_clause_eight_check · method · L504-L520 — def test_nonlinear_model_fails_the_clause_eight_check(self) -> None
test_correlated_sampling_needs_normal_inputs · method · L522-L538 — def test_correlated_sampling_needs_normal_inputs(self) -> None
test_impossible_correlation_matrix_is_rejected · method · L540-L556 — def test_impossible_correlation_matrix_is_rejected(self) -> None
test_variable_specification_parsing · method · L558-L577 — def test_variable_specification_parsing(self) -> None
test_cli_rejects_a_model_with_missing_or_unused_inputs · method · L579-L597 — def test_cli_rejects_a_model_with_missing_or_unused_inputs(self) -> None
test_end_to_end_report_is_strict_json · method · L599-L619 — def test_end_to_end_report_is_strict_json(self) -> None
ConversionTests · class · L623-L696 — class ConversionTests(unittest.TestCase)
setUp · method · L624-L625 — def setUp(self) -> None
test_plain_conversion_reports_a_factor · method · L627-L632 — def test_plain_conversion_reports_a_factor(self) -> None
test_context_is_required_and_named_in_the_error · method · L634-L639 — def test_context_is_required_and_named_in_the_error(self) -> None
test_spectroscopy_context_converts_and_propagates · method · L641-L662 — def test_spectroscopy_context_converts_and_propagates(self) -> None
test_offset_units_convert_the_value_and_the_difference_apart · method · L664-L682 — def test_offset_units_convert_the_value_and_the_difference_apart(self) -> None
test_unit_strings_are_bounded_and_screened · method · L684-L688 — def test_unit_strings_are_bounded_and_screened(self) -> None
test_unknown_units_raise_a_cli_error · method · L690-L696 — def test_unknown_units_raise_a_cli_error(self) -> None
AuditTests · class · L699-L827 — class AuditTests(unittest.TestCase)
_findings · method · L700-L701 — def _findings(self, source: str) -> list[dict]
_rules · method · L703-L704 — def _rules(self, source: str) -> set[str]
test_every_rule_fires_on_the_hazard_fixture · method · L706-L720 — def test_every_rule_fires_on_the_hazard_fixture(self) -> None
test_clean_source_produces_no_findings · method · L722-L723 — def test_clean_source_produces_no_findings(self) -> None
test_the_skills_own_scripts_are_clean · method · L725-L731 — def test_the_skills_own_scripts_are_clean(self) -> None
test_magnitude_after_an_explicit_conversion_is_accepted · method · L733-L736 — def test_magnitude_after_an_explicit_conversion_is_accepted(self) -> None
test_directive_comments_suppress_and_are_counted · method · L738-L760 — def test_directive_comments_suppress_and_are_counted(self) -> None
test_suppression_parsing · method · L762-L770 — def test_suppression_parsing(self) -> None
test_a_standalone_directive_covers_the_next_line · method · L772-L781 — def test_a_standalone_directive_covers_the_next_line(self) -> None
test_delta_units_silence_the_offset_warning · method · L783-L788 — def test_delta_units_silence_the_offset_warning(self) -> None
test_constant_detection_needs_three_significant_digits · method · L790-L794 — def test_constant_detection_needs_three_significant_digits(self) -> None
test_significant_digit_counting · method · L796-L801 — def test_significant_digit_counting(self) -> None
test_findings_are_ordered_and_carry_a_remedy · method · L803-L810 — def test_findings_are_ordered_and_carry_a_remedy(self) -> None
test_exit_code_respects_the_threshold · method · L812-L823 — def test_exit_code_respects_the_threshold(self) -> None
test_unparsable_source_is_reported_not_executed · method · L825-L827 — def test_unparsable_source_is_reported_not_executed(self) -> None
PlausibilityCatalogueTests · class · L830-L891 — class PlausibilityCatalogueTests(unittest.TestCase)
test_every_expression_declares_the_inputs_it_uses · method · L833-L844 — def test_every_expression_declares_the_inputs_it_uses(self) -> None
test_regimes_are_ordered_and_cover_the_line · method · L846-L853 — def test_regimes_are_ordered_and_cover_the_line(self) -> None
test_bands_are_ordered_positive_and_cited · method · L855-L860 — def test_bands_are_ordered_positive_and_cited(self) -> None
test_catalogue_names_are_unique · method · L862-L866 — def test_catalogue_names_are_unique(self) -> None
test_quantity_specifications_are_screened · method · L868-L872 — def test_quantity_specifications_are_screened(self) -> None
test_orders_of_magnitude_has_no_infinities · method · L874-L879 — def test_orders_of_magnitude_has_no_infinities(self) -> None
test_exit_code_respects_the_threshold · method · L881-L891 — def test_exit_code_respects_the_threshold(self) -> None
PlausibilityTests · class · L895-L1073 — class PlausibilityTests(unittest.TestCase)
_run · method · L896-L897 — def _run(self, argv: list[str]) -> dict
test_reynolds_matches_the_hand_computation · method · L899-L913 — def test_reynolds_matches_the_hand_computation(self) -> None
test_thermal_energy_tracks_scipy_constants · method · L915-L923 — def test_thermal_energy_tracks_scipy_constants(self) -> None
test_debye_length_matches_the_textbook_value · method · L925-L935 — def test_debye_length_matches_the_textbook_value(self) -> None: # 0.96 nm for a monovalent electrolyte at 100 mM and 25 C.
test_wrong_dimensionality_is_caught_before_any_number · method · L937-L950 — def test_wrong_dimensionality_is_caught_before_any_number(self) -> None
test_a_dimensional_group_result_is_refused · method · L952-L967 — def test_a_dimensional_group_result_is_refused(self) -> None
test_missing_inputs_name_their_dimensionality · method · L969-L974 — def test_missing_inputs_name_their_dimensionality(self) -> None
test_band_flags_an_order_of_magnitude_error · method · L976-L988 — def test_band_flags_an_order_of_magnitude_error(self) -> None
test_band_accepts_a_value_inside_the_range · method · L990-L998 — def test_band_accepts_a_value_inside_the_range(self) -> None
test_a_near_miss_is_questionable_not_implausible · method · L1000-L1007 — def test_a_near_miss_is_questionable_not_implausible(self) -> None
test_a_non_positive_magnitude_stays_strict_json · method · L1009-L1019 — def test_a_non_positive_magnitude_stays_strict_json(self) -> None
test_band_refuses_an_incomparable_dimension · method · L1021-L1028 — def test_band_refuses_an_incomparable_dimension(self) -> None
test_constant_names_are_reserved · method · L1030-L1039 — def test_constant_names_are_reserved(self) -> None
test_unknown_names_list_the_alternatives · method · L1041-L1044 — def test_unknown_names_list_the_alternatives(self) -> None
test_an_empty_request_is_rejected · method · L1046-L1048 — def test_an_empty_request_is_rejected(self) -> None
test_every_catalogue_entry_is_listed · method · L1050-L1055 — def test_every_catalogue_entry_is_listed(self) -> None
test_markdown_report_renders · method · L1057-L1073 — def test_markdown_report_renders(self) -> None