Skip to content

tests: refactor tests#33

Merged
ravnoor merged 3 commits intodevfrom
refactor/tests
Aug 22, 2025
Merged

tests: refactor tests#33
ravnoor merged 3 commits intodevfrom
refactor/tests

Conversation

@ravnoor
Copy link
Copy Markdown
Contributor

@ravnoor ravnoor commented Aug 21, 2025

This pull request significantly refactors and modernizes the tests/test_deepFCD.py unit tests for the deepFCD module. The main improvements include restructuring the test class for better organization, consolidating repeated logic into helper methods, improving parameterization and test setup, and enhancing test coverage for image I/O operations. The changes also streamline the code by removing redundant code and clarifying test intent.

Test suite refactor and modernization:

  • Refactored the test class from TestModule_deepFCD to TestDeepFCD, using setUpClass and setUp to centralize environment and file path setup, making the tests more maintainable and easier to configure for different environments.
  • Consolidated image comparison logic into a reusable _test_image_comparison helper method, reducing code duplication and clarifying test intent.
  • Replaced individual test methods for each image type with parameterized tests that use the helper method, improving readability and maintainability.

Expanded and improved image I/O tests:

  • Added a comprehensive test_image_io_operations method that tests reading, writing, and verifying physical space consistency and data integrity for different pixel types, as well as proper cleanup of temporary files.
  • Improved test_image_header_info to robustly

@ravnoor ravnoor changed the base branch from main to dev August 21, 2025 23:56
@ravnoor ravnoor merged commit 380f9d9 into dev Aug 22, 2025
6 checks passed
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.

1 participant