Skip to content

Commit ee2285e

Browse files
author
Dan-Flores
committed
use randint suggestion, remove test skips
1 parent cf7b75c commit ee2285e

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

test/test_encoders.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -636,11 +636,9 @@ def test_contiguity(self, method, tmp_path):
636636
# frame tensors, one is contiguous while the other is non-contiguous.
637637

638638
num_frames, channels, height, width = 5, 3, 64, 64
639-
contiguous_frames = (
640-
(torch.rand(num_frames, channels, height, width) * 255)
641-
.to(torch.uint8)
642-
.contiguous()
643-
)
639+
contiguous_frames = torch.randint(
640+
0, 256, size=(num_frames, channels, height, width), dtype=torch.uint8
641+
).contiguous()
644642
assert contiguous_frames.is_contiguous()
645643

646644
# Create non-contiguous frames by permuting, calling contiguous to update memory layout,

test/test_ops.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,8 +1345,6 @@ def test_video_encoder_against_ffmpeg_cli(self, tmp_path, format):
13451345

13461346
def test_to_file_like_custom_file_object(self):
13471347
"""Test to_file_like with a custom file-like object that implements write and seek."""
1348-
if get_ffmpeg_major_version() == 6:
1349-
pytest.skip("Skipping round trip test for FFmpeg 6")
13501348

13511349
class CustomFileObject:
13521350
def __init__(self):
@@ -1377,8 +1375,6 @@ def get_encoded_data(self):
13771375

13781376
def test_to_file_like_real_file(self, tmp_path):
13791377
"""Test to_file_like with a real file opened in binary write mode."""
1380-
if get_ffmpeg_major_version() == 6:
1381-
pytest.skip("Skipping round trip test for FFmpeg 6")
13821378
source_frames = self.decode(TEST_SRC_2_720P.path).data
13831379
file_path = tmp_path / "test_file_like.mp4"
13841380

0 commit comments

Comments
 (0)