forked from Urban-Meteorology-Reading/SUEWS
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
2-infra:code-refactorCode refactoring and cleanupCode refactoring and cleanup2-infra:testTesting infrastructure, pytestTesting infrastructure, pytest3-P2Medium priorityMedium priority4-readyReady for workReady for work
Description
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)
test_validate_produces_meaningful_output— merges add table to describe hydraulic-process related properties/connections #1, Observed soil moisture can not be used as an input #3, enrich the documentation of major components in the driver subroutine #7test_validate_second_run_not_truncated— merges improve coding guidelines #2, Need to expand Benchmark datasets #4test_validate_issue_1097_fixture— merges use "urbanised" meteorology for internal physical modules as forcing #5, to update WRF-SUEWS for latest SUEWS kernel #10test_validate_windows_paths— merges Urban haze effect #6, Description of "XSMD" in Meteorological Input File #9 (platform-gated)test_create_consolidated_report_writes_utf8— keep as-is (unit test)
Drop candidates
test_validate_handles_file_permission_scenarios— fragile, platform-dependent, tests OS behaviour more than SUEWStest_validate_error_injection_file_write_failure— edge case unlikely to regress
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
2-infra:code-refactorCode refactoring and cleanupCode refactoring and cleanup2-infra:testTesting infrastructure, pytestTesting infrastructure, pytest3-P2Medium priorityMedium priority4-readyReady for workReady for work