Skip to content
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

Update conftest.py #21003

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update conftest.py #21003

wants to merge 1 commit into from

Conversation

FNICKE
Copy link

@FNICKE FNICKE commented Mar 7, 2025

🌟 Summary of Fixes

Change Reason
Graceful handling of missing torch Prevents NameError if torch is referenced later
Safe handling of missing excluded_concrete_tests.txt Prevents FileNotFoundError and skips only non-empty lines
Improved backend checking More readable and easier to maintain
Encapsulated skip_if_backend() function Makes skipping tests more reusable and cleaner


### **🌟 Summary of Fixes**
| **Change** | **Reason** |
|------------|-----------|
| Graceful handling of missing `torch` | Prevents `NameError` if `torch` is referenced later |
| Safe handling of missing `excluded_concrete_tests.txt` | Prevents `FileNotFoundError` and skips only non-empty lines |
| Improved backend checking | More readable and easier to maintain |
| Encapsulated `skip_if_backend()` function | Makes skipping tests more reusable and cleaner |

---
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.43%. Comparing base (0fac3ab) to head (f23c109).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21003   +/-   ##
=======================================
  Coverage   82.43%   82.43%           
=======================================
  Files         562      562           
  Lines       53401    53401           
  Branches     8274     8274           
=======================================
  Hits        44020    44020           
  Misses       7361     7361           
  Partials     2020     2020           
Flag Coverage Δ
keras 82.25% <ø> (ø)
keras-jax 63.93% <ø> (ø)
keras-numpy 58.87% <ø> (+<0.01%) ⬆️
keras-openvino 32.64% <ø> (ø)
keras-tensorflow 64.36% <ø> (ø)
keras-torch 63.98% <ø> (ø)

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Assigned Reviewer
Development

Successfully merging this pull request may close these issues.

3 participants