Check YouTube URL before tests (#12952)

pull/12683/head
Glenn Jocher 9 months ago committed by GitHub
parent 68031133fd
commit c8b6a8bc37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      tests/test_python.py

@ -25,9 +25,8 @@ from ultralytics.utils import (
Retry,
checks,
)
from ultralytics.utils.downloads import download
from ultralytics.utils.downloads import download, is_url
from ultralytics.utils.torch_utils import TORCH_1_9
from . import CFG, IS_TMP_WRITEABLE, MODEL, SOURCE, TMP
@ -102,7 +101,7 @@ def test_predict_img(model_name):
def test_predict_visualize(model):
"""Test model predict methods with 'visualize=True' arguments."""
YOLO(WEIGHTS_DIR / model)(SOURCE, imgsz=32, visualize=True)
def test_predict_grey_and_4ch():
"""Test YOLO prediction on SOURCE converted to greyscale and 4-channel images."""
@ -131,6 +130,7 @@ def test_predict_grey_and_4ch():
@pytest.mark.slow
@pytest.mark.skipif(not ONLINE, reason="environment is offline")
@pytest.mark.skipif(not is_url("https://youtu.be/G17sBkb38XQ"), reason="YouTube URL issue")
@Retry(times=3, delay=10)
def test_youtube():
"""

Loading…
Cancel
Save