Skip to content

Convert test_loaders_pydantic.py to pytest format #446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

vladistan
Copy link
Contributor

  • Extract loader_test helper function from base class
  • Convert 4 test methods to standalone functions
  • Test both YAML and JSON loaders with different models

Copy link

codecov bot commented Aug 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.41%. Comparing base (bbf4f8b) to head (96d34dc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #446   +/-   ##
=======================================
  Coverage   77.41%   77.41%           
=======================================
  Files          52       52           
  Lines        4476     4476           
  Branches     1303     1303           
=======================================
  Hits         3465     3465           
  Misses        783      783           
  Partials      228      228           

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

@vladistan vladistan marked this pull request as ready for review August 4, 2025 14:00
Copy link
Collaborator

@ialarmedalien ialarmedalien left a comment

Choose a reason for hiding this comment

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

use pytest.mark.parametrize instead of the individual test functions

@vladistan vladistan force-pushed the convert-test-loaders-pydantic-to-pytest branch from 4150589 to 87c9f70 Compare August 4, 2025 17:23
@vladistan vladistan requested a review from ialarmedalien August 4, 2025 17:23
@vladistan vladistan force-pushed the convert-test-loaders-pydantic-to-pytest branch from 87c9f70 to c1c94ae Compare August 4, 2025 17:26
@vladistan vladistan force-pushed the convert-test-loaders-pydantic-to-pytest branch from bb35ddc to 96d34dc Compare August 4, 2025 21:18
@vladistan vladistan requested a review from ialarmedalien August 4, 2025 22:09
ialarmedalien
ialarmedalien previously approved these changes Aug 4, 2025
@ialarmedalien ialarmedalien dismissed their stale review August 4, 2025 22:15

tests failing

@vladistan
Copy link
Contributor Author

weird... works on my machine :-(

@vladistan vladistan force-pushed the convert-test-loaders-pydantic-to-pytest branch from e96c670 to 4089c9f Compare August 5, 2025 00:34
@ialarmedalien
Copy link
Collaborator

The issue here is that there is a test somewhere that's creating the files that these tests are using for comparison (the files already exist if you've run the tests locally, which is why it's so hard to debug locally). Files need to be added to the repo for these comparisons to execute correctly. The potentially bigger problem is that some directories are being git-ignored and this problem may affect numerous files in the repo.

vladistan and others added 6 commits August 17, 2025 22:48
- Extract loader_test helper function from base class
- Convert 4 test methods to standalone functions
- Test both YAML and JSON loaders with different models
@vladistan vladistan force-pushed the convert-test-loaders-pydantic-to-pytest branch from 929b645 to af32ced Compare August 18, 2025 02:49
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