Use test URLs that are less likely to disappear
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Wed, 26 Aug 2020 21:34:50 +0000 (22:34 +0100)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Wed, 26 Aug 2020 21:34:50 +0000 (22:34 +0100)
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 <rebecca_palmer@zoho.com>
Forwarded: not-needed

Gbp-Pq: Name stable_test_urls.patch

pandas/tests/io/excel/test_readers.py
pandas/tests/io/parser/test_common.py
pandas/tests/io/parser/test_network.py
pandas/tests/io/test_html.py

index 140cb80dbf7f8a5238178ea6f4d70793e63f19ef..b63b464aa4a9a19e5d96eb0595bd045645cd0785 100644 (file)
@@ -563,7 +563,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)
index 4c02a37b664553bfaeb838ce7b2f13a8379ebb26..781509bb6145c5d2b22a2c15a1992e1b2181086d 100644 (file)
@@ -910,7 +910,7 @@ def test_url(all_parsers, csv_dir_path):
     kwargs = dict(sep="\t")
 
     url = (
-        "https://raw.github.com/pandas-dev/pandas/master/"
+        "https://github.com/pandas-dev/pandas/raw/v1.0.3/"
         "pandas/tests/io/parser/data/salaries.csv"
     )
     url_result = parser.read_csv(url, **kwargs)
index 1b1576fdb9a198894dd2da095ed5ae6fa0b3a6b7..88a0a8a992a96fe2aa1a482966e4bfd5c158174c 100644 (file)
@@ -32,7 +32,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"
     )
 
index b649e394c780bec0887b5f4283aa41dcde166571..fac8a99372b1ae937d1025f703bb39dcb2fb251e 100644 (file)
@@ -134,7 +134,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, ".*Water.*")