Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Summary

Add 34 tests in tests/test_validation.py covering validation behavior:

  • Missing required fieldsValidationError raised
  • Extra unknown fields — silently ignored (serde default)
  • Null valuesValidationError or ValueError depending on field type
  • Empty stringsValueError for Decimal, accepted for Str
  • Boundary integers — no range validation (accepts negative, zero, max int)
  • Malformed datetimesValidationError for invalid, date-only accepted
  • Malformed decimalsValueError, Infinity/NaN accepted per Python spec
  • Nested validation — errors propagate from nested structures

Closes #33

Test plan

  • All 34 new tests pass
  • All existing tests still pass
  • Linter and type checker pass

Copilot AI changed the title [WIP] Add negative and edge-case tests for input validation Add validation tests for edge cases and malformed input Feb 8, 2026
Copilot AI requested a review from dannywillems February 8, 2026 00:27
@dannywillems dannywillems force-pushed the copilot/add-negative-edge-case-tests branch from ee59620 to c960bc7 Compare February 8, 2026 01:21
@dannywillems dannywillems marked this pull request as ready for review February 8, 2026 01:21
@dannywillems dannywillems changed the title Add validation tests for edge cases and malformed input tests: add edge-case and validation tests Feb 8, 2026
@dannywillems dannywillems force-pushed the copilot/add-negative-edge-case-tests branch from c960bc7 to 5c6cf5d Compare February 8, 2026 01:22
Add 34 tests covering missing fields, null values, empty strings,
boundary integers, malformed datetimes, malformed decimals, extra
unknown fields, and nested validation errors.

Closes #33
@dannywillems dannywillems force-pushed the copilot/add-negative-edge-case-tests branch from 5c6cf5d to cfdd507 Compare February 8, 2026 01:24
@dannywillems dannywillems force-pushed the copilot/add-negative-edge-case-tests branch from cfdd507 to b6bdf6b Compare February 8, 2026 01:25
@dannywillems dannywillems merged commit 3a3901b into main Feb 8, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add negative and edge-case tests

2 participants