Skip to content

Clean up overlapping test_cli_validation.py tests #1237

@sunt05

Description

@sunt05

Summary

test/core/test_cli_validation.py has significant test overlap — 12 tests that could be consolidated to ~5 without losing coverage.

Overlap analysis

  • Tests 1, 3, 7 (test_validate_generates_non_empty_report..., test_validate_returns_error_but_writes_output..., test_validate_report_content_quality) all run validate on minimal invalid YAML and check outputs are non-empty/meaningful
  • Tests 2, 4 (test_validate_second_run_does_not_truncate..., test_validate_second_run_on_updated_yaml...) both test idempotent re-runs
  • Tests 5, 10 (test_second_run_on_user_edited_yaml..., test_validate_with_complex_realistic_yaml) both use the issue_1097 fixture

Suggested consolidation (12 -> 5)

Drop candidates

  • test_validate_handles_file_permission_scenarios — fragile, platform-dependent, tests OS behaviour more than SUEWS
  • test_validate_error_injection_file_write_failure — edge case unlikely to regress

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions