-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
4 additional unit-tests #2239
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
4 additional unit-tests #2239
Conversation
tests/test_frame_selection_tools.py
Outdated
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
| @pytest.mark.parametrize("shrink, crop", [(1, False), (1, True), (2, False), (2, True)]) |
When a unit test fails, this makes debugging easier.
tests/test_frame_selection_tools.py
Outdated
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
tests/test_auxiliaryfunctions.py
Outdated
| for multianimal, bodyparts, multianimalbodyparts, uniquebodyparts in [ | ||
| (False, all_bodyparts, None, None), | ||
| (True, None, all_bodyparts[:3], all_bodyparts[3:]), | ||
| ]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as below: let's use the parametrize fixture.
|
Awesome, just left minor comments. |
AlexEMG
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
No description provided.