Refactor test units for analysis_node and parallel_analysis_node#104
Closed
lucamelis wants to merge 1 commit intofacebookresearch:mainfrom
Closed
Refactor test units for analysis_node and parallel_analysis_node#104lucamelis wants to merge 1 commit intofacebookresearch:mainfrom
lucamelis wants to merge 1 commit intofacebookresearch:mainfrom
Conversation
Summary:
This diff refactors test units for `analysis_node` and `parallel_analysis_node` to improve code quality and maintainability.
### Changes
* In `test_parallel_analysis_node.py`:
* Removed redundant assertions and combined them into a single assertion for `analysis_outputs_dict`.
* Added type hints for scalar float fields in `analysis_outputs_dict`.
* In `base_test_analysis_node.py`:
* Added a new method `assertIsListOfFloats` to assert that a value is a list containing only float or np.floating elements.
* Imported `Any`, `Dict`, and `List` from the `typing` module.
* In `test_analysis_node.py`:
* Fixed a typo in the docstring of `test_turn_cap_eps_on` method.
Differential Revision: D92843962
|
@lucamelis has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92843962. |
|
This pull request has been merged in 33e2c78. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
This diff refactors test units for
analysis_nodeandparallel_analysis_nodeto improve code quality and maintainability.Changes
test_parallel_analysis_node.py:analysis_outputs_dict.analysis_outputs_dict.base_test_analysis_node.py:assertIsListOfFloatsto assert that a value is a list containing only float or np.floating elements.Any,Dict, andListfrom thetypingmodule.test_analysis_node.py:test_turn_cap_eps_onmethod.Differential Revision: D92843962