From c8b6a8bc37ce196a6b7e0c153539402db4383c16 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Mon, 20 May 2024 20:45:11 +0200 Subject: [PATCH] Check YouTube URL before tests (#12952) --- tests/test_python.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_python.py b/tests/test_python.py index 951674312..0f1ba251c 100644 --- a/tests/test_python.py +++ b/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(): """