From 12de28bfb0c19ebd0a76230164bfa35a298e8c57 Mon Sep 17 00:00:00 2001 From: joaopfonseca Date: Sun, 6 Oct 2024 19:29:45 -0400 Subject: [PATCH] TEST change url testing to issue a warning instead of error (#25) --- mlresearch/datasets/tests/test_datasets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlresearch/datasets/tests/test_datasets.py b/mlresearch/datasets/tests/test_datasets.py index a88b11a..faf28fa 100644 --- a/mlresearch/datasets/tests/test_datasets.py +++ b/mlresearch/datasets/tests/test_datasets.py @@ -1,3 +1,4 @@ +import warnings from urllib.request import urlopen from urllib.error import URLError import multiprocessing.dummy as mp @@ -32,7 +33,7 @@ def _open_url(url): try: return urlopen(url) except URLError as e: - raise URLError(f"Error for url {url}: {e}") + warnings.warn(f"Error for url {url}: {e}") def test_urls():