Skip to content

Use module-level test functions - #3281

Merged
adamtheturtle merged 3 commits into
mainfrom
flatten-simple-test-classes
Oct 6, 2026
Merged

adamtheturtle merged 3 commits into
mainfrom
flatten-simple-test-classes

Conversation

@adamtheturtle

@adamtheturtle adamtheturtle commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Convert 57 stateless classes containing 142 static test methods into module-level functions as preparation for Karva. Retain pytest, fixture inputs, test markers, runtime type checks, assertions, and coverage gates.

Group tests into files by API area or behavior. Keep small, cohesive modules together and put genuinely shared helpers in support modules. Remove the organising comments and retain meaningful context in module or test docstrings. Restore shorter function names where the file supplies the context, and retain operation context only where names would collide. Preserve module-local fixture reach when files move.

Share one model_target_credentials.py module between the synchronous and asynchronous Model Target API tests. Move the response builder into model_targets/responses.py and remove both generic helpers.py files.

Validation: before and after collection contains the same 467 cases, including parametrized cases. Independent comparisons preserve test bodies and decorators after accounting for the previous moves, fixture changes, and direct asyncio.run calls. Moved definitions are unchanged. Applicable Prek pre-commit and pre-push checks and the manual Pylint hook pass.

The full suite passes with the existing 100% line and branch coverage gate.

@adamtheturtle
adamtheturtle merged commit 0497d03 into main Oct 6, 2026
13 checks passed
@adamtheturtle
adamtheturtle deleted the flatten-simple-test-classes branch October 6, 2026 09:59

This branch was successfully deployed

1 active deployment
development — e361a85a Deployed Oct 6, 2026 by adamtheturtle via pages #1140
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.

1 participant