Refactor pytest config, enforce 80% coverage, and add basic FastAPI tests #12
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: vitae/backend-vitae#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch ":main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request includes several important improvements and additions:
Pytest configuration cleanup:
Removed explicit
python_files
, incorrecttestpaths
, and redundantminversion
frompyproject.toml
.This aligns test discovery with the new project structure, where tests are kept in a separate directory outside the source code, facilitating containerization by excluding tests from the build context.
Also keeps verbosity flags to improve test output clarity.
Coverage enforcement:
Added
--cov-fail-under=80
to the coverage test command as per project requirements specified by Guto, ensuring the test suite fails if coverage drops below 80%.This helps maintain consistent code quality and encourages adequate test coverage.
Initial API tests:
Introduced a basic test setup for the FastAPI app:
TestClient
for easy API interaction in tests./
) returns{'Hello': 'World'}
.These changes establish a solid foundation for testing practices and code quality assurance going forward.
9ea9878f50
to45d779d0da
Great work!