Skip to content

Don't let unit test modify the source folder.#22194

Merged
hertschuh merged 1 commit intokeras-team:masterfrom
hertschuh:readonly
Feb 17, 2026
Merged

Don't let unit test modify the source folder.#22194
hertschuh merged 1 commit intokeras-team:masterfrom
hertschuh:readonly

Conversation

@hertschuh
Copy link
Copy Markdown
Collaborator

@hertschuh hertschuh commented Feb 17, 2026

This required changing some tests to use a temporary folder instead of the current one.

Changed some unit tests to use a temporary folder instead of the current one. This uses self.get_temp_dir(), which auto cleans up and makes the tests easier.

Also fixed file_utils.filter_safe_zipinfos and filter_safe_tarinfos to resolve links within the context of the destination folder instead of hardcoding "." as the destination path.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

Changed some unit tests to use a temporary folder instead of the current one.

Also fixed `file_utils.filter_safe_zipinfos` and `filter_safe_tarinfos` to resolve links within the context of the destination folder instead of hardcoding `"."` as the destination path.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.77%. Comparing base (0238793) to head (d3756b4).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #22194      +/-   ##
==========================================
- Coverage   82.77%   82.77%   -0.01%     
==========================================
  Files         593      593              
  Lines       63867    63866       -1     
  Branches    10040    10040              
==========================================
- Hits        52866    52865       -1     
  Misses       8424     8424              
  Partials     2577     2577              
Flag Coverage Δ
keras 82.59% <100.00%> (-0.01%) ⬇️
keras-jax 62.24% <100.00%> (-0.01%) ⬇️
keras-numpy 56.37% <100.00%> (-0.01%) ⬇️
keras-openvino 37.53% <50.00%> (-0.01%) ⬇️
keras-tensorflow 63.48% <100.00%> (-0.01%) ⬇️
keras-torch 62.30% <100.00%> (-0.01%) ⬇️

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.

@google-ml-butler google-ml-butler bot added kokoro:force-run ready to pull Ready to be merged into the codebase labels Feb 17, 2026
@hertschuh hertschuh merged commit 2465b66 into keras-team:master Feb 17, 2026
13 checks passed
@google-ml-butler google-ml-butler bot removed awaiting review ready to pull Ready to be merged into the codebase labels Feb 17, 2026
@hertschuh hertschuh deleted the readonly branch February 17, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants