Merged
Conversation
jeylau
suggested changes
May 11, 2023
tests/test_frame_selection_tools.py
Outdated
Comment on lines
16
to
19
| for fps, duration, n_to_pick, start, end, index, valid_frame_indices in [ | ||
| (32, 10, 10, 0, 1, None, list(range(0, 320))), # 320 frames at 32 fps -> 10 seconds | ||
| (16, 100, 50, 0, 1, frame_index_1, frame_index_1), # 1600 frames at 16 fps -> 100 seconds | ||
| (16, 100, 5, 0.25, 0.3, frame_index_2, valid_frame_index_2), # 1600 frames at 16 fps -> 100 seconds |
Contributor
There was a problem hiding this comment.
Can these multiple sets of parameters be moved outside the func in @pytest.mark.parametrize()?; e.g., as in
DeepLabCut/tests/test_video.py
Line 76 in 9fcf1f8
When a unit test fails, this makes debugging easier.
tests/test_frame_selection_tools.py
Outdated
Comment on lines
49
to
52
| for fps, nframes, n_to_pick, start, end, index, valid_frame_indices in [ | ||
| (32, 320, 10, 0, 1, None, list(range(0, 320))), # 320 frames at 32 fps -> 10 seconds | ||
| (16, 1600, 50, 0, 1, frame_index_1, frame_index_1), # 1600 frames at 16 fps -> 100 seconds | ||
| (16, 1600, 5, 0.25, 0.3, frame_index_2, valid_frame_index_2), # 1600 frames at 16 fps -> 100 seconds |
tests/test_auxiliaryfunctions.py
Outdated
Comment on lines
139
to
142
| for multianimal, bodyparts, multianimalbodyparts, uniquebodyparts in [ | ||
| (False, all_bodyparts, None, None), | ||
| (True, None, all_bodyparts[:3], all_bodyparts[3:]), | ||
| ]: |
Contributor
There was a problem hiding this comment.
Same as below: let's use the parametrize fixture.
Contributor
|
Awesome, just left minor comments. |
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.
No description provided.