Skip to content

test: replace cast() with isinstance asserts in integration tests#787

Merged
vdusek merged 2 commits intomasterfrom
refactor/cast-to-isinstance-in-integration-tests
May 11, 2026
Merged

test: replace cast() with isinstance asserts in integration tests#787
vdusek merged 2 commits intomasterfrom
refactor/cast-to-isinstance-in-integration-tests

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented May 11, 2026

Sweep integration tests to replace type-only cast('T', result) calls with runtime assert isinstance(result, T) checks. Where the value is the typed model, the assert both narrows the type for ty and verifies the response shape at runtime instead of trusting it blindly.

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels May 11, 2026
@vdusek vdusek self-assigned this May 11, 2026
@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 11, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label May 11, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.73%. Comparing base (9cf3794) to head (df91af9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #787      +/-   ##
==========================================
+ Coverage   97.67%   97.73%   +0.06%     
==========================================
  Files          48       48              
  Lines        4864     4864              
==========================================
+ Hits         4751     4754       +3     
+ Misses        113      110       -3     
Flag Coverage Δ
integration 93.66% <ø> (+0.04%) ⬆️
unit 86.20% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@vdusek vdusek requested a review from janbuchar May 11, 2026 09:33
@vdusek vdusek merged commit fa24a21 into master May 11, 2026
26 checks passed
@vdusek vdusek deleted the refactor/cast-to-isinstance-in-integration-tests branch May 11, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants