Skip to content

Add negative and edge-case tests #33

@dannywillems

Description

@dannywillems

Problem

There are no tests for malformed input, missing required fields, extra unknown fields, empty strings, null values, or boundary integers.

For a schema library, validation behavior on bad input is critical to document and test.

Proposal

Add tests covering at minimum:

  • Missing required fields (should raise)
  • Extra unknown fields (document behavior: ignore or raise?)
  • Null values for required fields
  • Empty strings for fields like ip, port
  • Boundary integers (0, negative, max int)
  • Malformed datetime strings
  • Malformed decimal values

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions