From: Debian Science Team Date: Fri, 28 Jan 2022 19:22:53 +0000 (+0000) Subject: Use test URLs that are less likely to disappear X-Git-Tag: archive/raspbian/1.5.3+dfsg-2+rpi1~1^2^2^2^2^2^2^2~14 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=066bc97c65b0616a95f5ff826fc99d3f75a4a9f3;p=pandas.git Use test URLs that are less likely to disappear Avoid 404 errors in stable when upstream reorganize the test data (happened to two of these in 0.25 -> 1.0). It is _not_ necessary to update the tag version on every package release, only if these tests fail because they expect moved/changed data. Author: Rebecca N. Palmer Forwarded: not-needed Gbp-Pq: Name stable_test_urls.patch --- diff --git a/pandas/tests/io/excel/test_readers.py b/pandas/tests/io/excel/test_readers.py index 1f081ee2..123a03b6 100644 --- a/pandas/tests/io/excel/test_readers.py +++ b/pandas/tests/io/excel/test_readers.py @@ -771,7 +771,7 @@ class TestReaders: @tm.network def test_read_from_http_url(self, read_ext): url = ( - "https://raw.githubusercontent.com/pandas-dev/pandas/master/" + "https://raw.githubusercontent.com/pandas-dev/pandas/v1.0.3/" "pandas/tests/io/data/excel/test1" + read_ext ) url_table = pd.read_excel(url) diff --git a/pandas/tests/io/parser/test_network.py b/pandas/tests/io/parser/test_network.py index 497dd74d..f2392c42 100644 --- a/pandas/tests/io/parser/test_network.py +++ b/pandas/tests/io/parser/test_network.py @@ -36,7 +36,7 @@ def check_compressed_urls(salaries_table, compression, extension, mode, engine): # test reading compressed urls with various engines and # extension inference base_url = ( - "https://github.com/pandas-dev/pandas/raw/master/" + "https://github.com/pandas-dev/pandas/raw/v1.0.3/" "pandas/tests/io/parser/data/salaries.csv" ) diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index f842e4cd..1de02679 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -162,7 +162,7 @@ class TestReadHtml: @tm.network def test_spam_url(self): url = ( - "https://raw.githubusercontent.com/pandas-dev/pandas/master/" + "https://raw.githubusercontent.com/pandas-dev/pandas/v1.0.3/" "pandas/tests/io/data/html/spam.html" ) df1 = self.read_html(url, match=".*Water.*")