Unverified Commit 63251809 authored by Francisco Massa's avatar Francisco Massa Committed by GitHub
Browse files

Remove video download and instead move it to repo (#3116)

Makes it appease fbcode internal tests
parent 2d80e99b
......@@ -3,7 +3,6 @@ import contextlib
import sys
import tempfile
import torch
import torchvision.datasets.utils as utils
import torchvision.io as io
from torchvision import get_video_backend
import unittest
......@@ -148,20 +147,12 @@ class TestIO(unittest.TestCase):
self.assertTrue((data[5:8].float() - lv.float()).abs().max() < self.TOLERANCE)
def test_read_packed_b_frames_divx_file(self):
with get_tmp_dir() as temp_dir:
name = "hmdb51_Turnk_r_Pippi_Michel_cartwheel_f_cm_np2_le_med_6.avi"
f_name = os.path.join(temp_dir, name)
url = "https://download.pytorch.org/vision_tests/io/" + name
try:
utils.download_url(url, temp_dir)
f_name = os.path.join(VIDEO_DIR, name)
pts, fps = io.read_video_timestamps(f_name)
self.assertEqual(pts, sorted(pts))
self.assertEqual(fps, 30)
except URLError:
msg = "could not download test file '{}'".format(url)
warnings.warn(msg, RuntimeWarning)
raise unittest.SkipTest(msg)
def test_read_timestamps_from_packet(self):
with temp_video(10, 300, 300, 5, video_codec='mpeg4') as (f_name, data):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment