Skip to content

test : added pytest boundary tests for patient_input PredictionResponse and validators#1498

Open
tmdeveloper007 wants to merge 1 commit into
gopaljilab:mainfrom
tmdeveloper007:#1493
Open

test : added pytest boundary tests for patient_input PredictionResponse and validators#1498
tmdeveloper007 wants to merge 1 commit into
gopaljilab:mainfrom
tmdeveloper007:#1493

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Closes #1493.

Summary of What Has Been Done:
Added 28 pytest tests covering PredictionResponse.from_probability risk-tier boundaries (LOW/MEDIUM/HIGH at 0.3/0.6, prediction 0/1 at 0.5) and PatientInput validation boundary conditions (age, BMI, HbA1c, blood glucose min/max limits).

Changes Made:

  • tests/test_patient_input_boundary.py (268 lines, 28 tests across 2 classes)

Impact it Made:

  • Validates the from_probability factory method contract for clinical risk tiers
  • Guards field boundary conditions that could cause silent data errors in prediction

Note: Please assign this PR to the tmdeveloper007 account.

- 28 tests covering PredictionResponse.from_probability threshold cases
  (LOW < 0.3, MEDIUM 0.3-0.6, HIGH >= 0.6) and prediction 0/1 boundary at 0.5
- PatientInput boundary conditions: age min/max, BMI min/max, HbA1c min/max
- Validates that zero clinical values are rejected by pydantic ge constraints
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@tmdeveloper007 is attempting to deploy a commit to the gopaljilab's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the type:testing Adding, updating, or fixing unit/integration tests. label Jun 19, 2026
@tmdeveloper007

Copy link
Copy Markdown
Contributor Author

Workflow run awaiting maintainer approval — please approve from the Actions tab.

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

Labels

type:testing Adding, updating, or fixing unit/integration tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test : add pytest tests for app/schemas/patient_input PredictionResponse and boundary cases

1 participant