langextract icon indicating copy to clipboard operation
langextract copied to clipboard

Add edge case tests for prompt validation

Open navaneedan07 opened this issue 1 month ago • 0 comments

Problem

The prompt validation test suite lacks coverage for important edge cases that could cause unexpected behavior in production.

Proposed Solution

Add three new test cases to tests/prompt_validation_test.py to improve test coverage:

  1. Empty extraction text - Verify that empty strings are properly rejected
  2. Unicode and special characters - Ensure proper handling of café, °F, and other unicode
  3. Very long extraction text - Test graceful handling of 1000+ character extractions

Benefits

  • Improves reliability by catching edge case bugs early
  • Better test coverage for error handling paths
  • Documents expected behavior for edge cases

Implementation

Three new test methods added to PromptAlignmentValidationTest class following existing test patterns.

navaneedan07 avatar Jan 17 '26 10:01 navaneedan07