Skip to content

feat: Add property-based testing with Hypothesis #47

Description

@mark-e-deyoung

Problem

The test suite uses example-based testing (specific inputs → specific outputs) which can miss edge cases. Property-based testing explores the input space automatically to find edge-case failures.

Solution

Add Hypothesis (well-established property-based testing framework, used by pytest and in academia/industry) and write property-based tests for:

  • sanitize_git_url() — URL redaction invariants
  • _get_backoff_delay() — monotonicity, bounds

Files

  • requirements.txt — add hypothesis>=6.0
  • .github/workflows/ci.yml — add hypothesis to pip install
  • tests/unit/test_scm.py — Hypothesis tests for sanitize_git_url
  • tests/unit/test_backoff_hypothesis.py — Hypothesis tests for backoff

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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