Skip to content

🧪 Add schema config fixtures for invalid $ref value cases#1733

Merged
chrisjsewell merged 1 commit into
masterfrom
schema-ref-config-fixtures
Jun 30, 2026
Merged

🧪 Add schema config fixtures for invalid $ref value cases#1733
chrisjsewell merged 1 commit into
masterfrom
schema-ref-config-fixtures

Conversation

@chrisjsewell

Copy link
Copy Markdown
Member

Adds two test_schema_config fixtures covering the $ref config-error branches in resolve_refs that previously had no fixture:

  • ref_value_not_string — a $ref whose value is not a string ($ref: 123) → Invalid $ref value: 123, expected a string.
  • ref_not_defs_prefix — a $ref that does not start with #/$defs/ ($ref: "type-impl") → Invalid $ref value: type-impl, expected to start with '#/$defs/'.

These complete the fixture coverage of resolve_refs' error cases (alongside the existing missing-target / sibling-key / circular fixtures) and serve as the parity oracle for the equivalent checks in ubcode's faithful resolve_refs port.

Test-only; no behavior change.

Cover the two remaining `$ref` config-error branches in `resolve_refs` that
lacked fixtures: a `$ref` value that is not a string, and a `$ref` that does not
start with `#/$defs/`. These serve as the parity oracle for the equivalent ubcode
checks.
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.37%. Comparing base (4e10030) to head (3876a1e).
⚠️ Report is 298 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1733      +/-   ##
==========================================
+ Coverage   86.87%   89.37%   +2.49%     
==========================================
  Files          56       72      +16     
  Lines        6532    10549    +4017     
==========================================
+ Hits         5675     9428    +3753     
- Misses        857     1121     +264     
Flag Coverage Δ
pytests 89.37% <ø> (+2.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chrisjsewell chrisjsewell requested a review from ubmarco June 30, 2026 15:51
@chrisjsewell chrisjsewell merged commit 7aeb1b5 into master Jun 30, 2026
24 checks passed
@chrisjsewell chrisjsewell deleted the schema-ref-config-fixtures branch June 30, 2026 17:46
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.

2 participants