models icon indicating copy to clipboard operation
models copied to clipboard

[Orbit] Achieve 100% test coverage for export_saved_model

Open LINYV0719 opened this issue 1 month ago • 0 comments

Description

This PR adds a missing unit test export_saved_model_test.py to verify that ExportFileManager.clean_up correctly handles negative max_to_keep values (early return).

So I added test_export_file_manager_negative_max_to_keep to verify that no files are deleted when max_to_keep is negative.

Type of change

For a new feature or function, please create an issue first to discuss it with us before submitting a pull request.

Note: Please delete options that are not relevant.

[x] Other (Test coverage improvement)

Tests

I verified the changes by running the unit tests and generating a coverage report.

Test Configuration:

OS: Windows 11 Python Version: 3.10 Command: python -m orbit.actions.export_saved_model_test coverage run --source=orbit -m orbit.actions.export_saved_model_test

Checklist

  • [x] I have signed the Contributor License Agreement.
  • [x] I have read guidelines for pull request.
  • [x] My code follows the coding guidelines.
  • [x] I have performed a self code review of my own code.
  • [x] I have commented my code, particularly in hard-to-understand areas.
  • [x] I have made corresponding changes to the documentation.
  • [x] My changes generate no new warnings.
  • [x] I have added tests that prove my fix is effective or that my feature works.

LINYV0719 avatar Jan 03 '26 12:01 LINYV0719