Skip to content

Commit

Permalink
Add video search to "robustify" (excessively) fragile test (#1262)
Browse files Browse the repository at this point in the history
Add video search to fix fragile test
  • Loading branch information
roomrys authored Apr 6, 2023
1 parent 11a71ff commit 4cd8c0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/fixtures/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def min_labels_robot():
@pytest.fixture
def siv_robot():
"""Created before grayscale attribute was added to SingleImageVideo backend."""
return Labels.load_file(TEST_SLP_SIV_ROBOT)
return Labels.load_file(TEST_SLP_SIV_ROBOT, video_search="tests/data/videos/")


@pytest.fixture
Expand Down
6 changes: 4 additions & 2 deletions tests/io/test_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def test_reset_video_mp4(small_robot_mp4_vid: Video):
assert_video_params(video=video, filename=filename, bgr=True, reset=True)


def test_reset_video_siv(small_robot_single_image_vid: Video, siv_robot: Labels):
def test_reset_video_siv(small_robot_single_image_vid: Video):
video = small_robot_single_image_vid
filename = video.backend.filename

Expand Down Expand Up @@ -548,7 +548,9 @@ def test_reset_video_siv(small_robot_single_image_vid: Video, siv_robot: Labels)
assert_video_params(video=video, filenames=filenames, reset=True)

# Test reset does not break deserialization of older slp
labels: Labels = Labels.load_file(TEST_SLP_SIV_ROBOT)
labels: Labels = Labels.load_file(
TEST_SLP_SIV_ROBOT, video_search="tests/data/videos/"
)
video: Video = labels.video
filename = labels.video.backend.filename
labels.video.backend.reset(filename=filename, grayscale=True)
Expand Down

0 comments on commit 4cd8c0d

Please sign in to comment.