Skip to content

[Enhancement] Add edge-case test coverage for validation helper functions #1296

Description

@jyotish6699

Summary

The validation helper utilities currently have a solid test suite, but several input-handling branches and edge cases are not covered by automated tests.

Proposed Improvements

Add test coverage for the following scenarios:

get_choice()

  • Verify custom error_invalid messages are displayed correctly.

get_yes_no()

  • Verify behavior when the user enters an empty value before providing valid input.

get_int_list()

  • Verify handling of empty input before valid integer list input.

get_float_list()

  • Verify handling of empty input before valid float list input.

get_non_empty_string()

  • Verify whitespace-only input is treated as empty input.

Benefits

  • Improves overall test coverage.
  • Validates existing input-validation branches.
  • Helps prevent regressions in user input handling.
  • Requires no changes to production code.

Verification

The proposed tests have been implemented and verified locally.

  • All existing tests pass.
  • Full test suite passes successfully (236 passed).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions