Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several updates to the test suite, focusing on improving the robustness and coverage of the tests. The most important changes include adding new test cases, modifying existing test cases for better accuracy, and ensuring proper error handling.
Enhancements to test cases:
tests/test_common.py
: Modifiedtest_load_realm_class_attribute_error
to use a mock module with no attributes allowed, ensuring any attribute access raisesAttributeError
.tests/test_common.py
: Addedtest_load_realm_class_caching
to verify that theload_realm_class
function correctly caches the class after the first load, avoiding redundant imports.tests/test_common.py
: Addedtest_get_path_resolve_error
to handle exceptions during thePath.resolve
call, ensuring the function returnsNone
when an error occurs.Improvements to error handling:
tests/test_report_transfer.py
: Addedtest_transfer_report_general_exception_with_result
to simulate an error during logging after a successful subprocess run, ensuring the function handles the exception and logs the appropriate messages.Minor fixes:
tests/test_config_loader.py
: Simplified thetest_config_immutable
by directly attempting to modify theMappingProxyType
configuration, ensuring immutability.tests/test_config_loader.py
: Updatedtest_configs_loaded
to patch theload_config
method directly and ensure theconfigs
attribute is correctly set.tests/test_slurm_utils.py
: Added# type: ignore
comments to tests with invalid path types to suppress type checking errors.