Skip to content

Conversation

@jooola
Copy link
Member

@jooola jooola commented Aug 19, 2025

In our bound models, many of the methods are only proxies to the api client methods. But our tests are always testing the full stack down to the HTTP requests. This lead to a lot of duplicate tests for the API client and the bound models methods.

This change removes the bound models methods tests, and uses a generic "proxy method test" for all our bound models.

@jooola jooola force-pushed the generate-bound-model-tests branch from 686fce8 to dfa9389 Compare September 29, 2025 18:44
@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.58%. Comparing base (131b142) to head (95940a2).
⚠️ Report is 43 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #546      +/-   ##
==========================================
+ Coverage   95.82%   96.58%   +0.76%     
==========================================
  Files          67       67              
  Lines        3401     3401              
==========================================
+ Hits         3259     3285      +26     
+ Misses        142      116      -26     

☔ 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.

@jooola jooola force-pushed the generate-bound-model-tests branch 3 times, most recently from 77559ad to 965e21b Compare September 30, 2025 15:56
@jooola jooola marked this pull request as ready for review September 30, 2025 15:56
@jooola jooola changed the base branch from main to use_kwargs_in_bound_methods September 30, 2025 15:57
@jooola jooola force-pushed the generate-bound-model-tests branch from 965e21b to e50082d Compare September 30, 2025 15:58
@jooola
Copy link
Member Author

jooola commented Sep 30, 2025

Depends on #564

@jooola jooola force-pushed the generate-bound-model-tests branch 2 times, most recently from 144860b to 04dee98 Compare September 30, 2025 17:47
jooola added a commit that referenced this pull request Oct 2, 2025
Base automatically changed from use_kwargs_in_bound_methods to main October 2, 2025 08:01
@jooola jooola force-pushed the generate-bound-model-tests branch from 04dee98 to 5ceab8e Compare October 2, 2025 08:03
@jooola
Copy link
Member Author

jooola commented Oct 2, 2025

The diff on this MR is really large, but the important bits are in f0b3622

To further check this PR is valid, I recommend looking at the coverage report and see that "nothing" changed.

@jooola jooola force-pushed the generate-bound-model-tests branch from 5ceab8e to 95940a2 Compare October 8, 2025 12:32
Copy link
Contributor

@lukasmetzner lukasmetzner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool 🚀

@jooola jooola merged commit ab6a657 into main Oct 10, 2025
11 checks passed
@jooola jooola deleted the generate-bound-model-tests branch October 10, 2025 07:50
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.

3 participants