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

Unittests #30

Merged
merged 7 commits into from
Dec 5, 2024
Merged

Unittests #30

merged 7 commits into from
Dec 5, 2024

Conversation

glrs
Copy link
Collaborator

@glrs glrs commented Dec 5, 2024

This pull request includes significant updates to the test suite for the core and module utilities, like YggdrasilUtilities and ConfigLoader classes. The changes primarily focus on enhancing test coverage, improving test reliability, and ensuring proper handling of various edge cases.

Enhancements to YggdrasilUtilities tests:

  • Added setup and teardown methods to TestYggdrasilUtilities to manage temporary configuration directories and reset module cache.
  • Improved test coverage by adding new test cases for handling ImportError, AttributeError, and file existence checks in YggdrasilUtilities.load_realm_class and YggdrasilUtilities.load_module.
  • Added tests for environment variable handling, including cases where variables do not exist or have default values.
  • Introduced tests for sequence file operations, including reading, writing, and handling errors.

Enhancements to ConfigLoader tests:

  • Added initialization and configuration loading tests, including handling of invalid JSON, file not found, and unexpected exceptions.
  • Improved test coverage for the __getitem__ method, ensuring proper behavior for existing and non-existing keys, and immutability of the configuration data.
  • Added tests for the config_manager instance and module-level configuration loading.
  • Included tests to ensure safe handling of directory traversal in file paths.

Similar for the rest.

@glrs glrs merged commit 5268a52 into NationalGenomicsInfrastructure:main Dec 5, 2024
3 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