Skip to content

Conversation

@harryswift01
Copy link
Contributor

Summary

This PR refactors the test structure for improved modularity and dynamic testing, integrates tests/data files for ease of use, and adds comprehensive tests for ConfigManager argument merging and hierarchy.

Changes

Refactor test structure for improved modularity and dynamic testing:

  • Moved tests to individual files for better organization
  • Implemented temporary files and directories for dynamic testing
  • Integrated tests/data files for ease of use
  • Included an __init__.py file, that is empty, to allow for the import of the data directory as a module

Moving test_CodeEntropy_imported into tests/test_main_mcc.py instead of a standalone file:

  • Relocated test_CodeEntropy_imported to tests/test_main_mcc.py
  • Ensured compatibility with the new test structure

Change naming of test_mainmcc to TestMainMcc:

  • Renamed test_mainmcc to TestMainMcc for consistency

Add comprehensive tests for ConfigManager argument merging and hierarchy:

  • Implemented tests ensuring CLI > YAML > default precedence
  • Added validation for missing required arguments and invalid types
  • Verified that empty YAML files fall back to defaults correctly
  • Mocked file handling to test configuration loading behavior

Impact

  • Improved modularity and organization of test files
  • Enhanced dynamic testing capabilities with temporary files and directories
  • Simplified test integration with data files
  • Ensured proper import of the data directory as a module
  • Verified argument precedence (CLI > YAML > default) in ConfigManager
  • Validated handling of missing required arguments and invalid types
  • Confirmed fallback behavior for empty YAML files
  • Mocked file handling to test configuration loading behavior

- Moved tests to individual files for better organization
- Implemented temporary files and directories for dynamic testing
- Integrated tests/data files for ease of use
- Included an __init__.py file, that is empty, to allow for the import of the data directory as a module
…chy:

- Implemented tests ensuring CLI > YAML > default precedence
- Added validation for missing required arguments and invalid types
- Verified that empty YAML files fall back to defaults correctly
- Mocked file handling to test configuration loading behavior
@harryswift01 harryswift01 added this to the WP7 - Refactor milestone Mar 31, 2025
@harryswift01 harryswift01 requested a review from jimboid March 31, 2025 14:39
@harryswift01 harryswift01 self-assigned this Mar 31, 2025
@harryswift01 harryswift01 linked an issue Mar 31, 2025 that may be closed by this pull request
@harryswift01 harryswift01 changed the title 78 test cases for input arguments Additional Test Cases for Input Configuration Mar 31, 2025
@harryswift01 harryswift01 modified the milestones: WP7 - Refactor, WP4 - Input/Output Mar 31, 2025
Copy link
Member

@jimboid jimboid left a comment

Choose a reason for hiding this comment

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

A solid improvement to the test system. Looks fine to merge

@harryswift01 harryswift01 merged commit 1f21ee2 into main Apr 1, 2025
6 checks passed
@harryswift01 harryswift01 deleted the 78-test-cases-for-input-arguments branch April 1, 2025 08:47
@jimboid jimboid modified the milestones: WP4 - Input/Output, 1.0.0 release Jun 10, 2025
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.

Test Cases for Input Arguments

3 participants