Use test URLs that are less likely to disappear
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Mon, 7 Dec 2020 23:06:28 +0000 (23:06 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Mon, 7 Dec 2020 23:06:28 +0000 (23:06 +0000)
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 3410e957f893a914164ee1b508d55ee0073f6ca7..e9ea1363a9d3cfd71e3cfb53e8f33cbe52ea5e8c 100644 (file)
@@ -636,7 +636,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 9434ad5fe8761abf37a23781867332ad5e0e7722..3e3f38a62401d39a0a2ac3ff4c98dd923c9da03a 100644 (file)
@@ -911,7 +911,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 509ae899096999fa88a5d1012c2ab838bc59226a..83164339131fc90f5de43a39d150dbba56592ff3 100644 (file)
@@ -33,7 +33,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 2c93dbb5b6b83eec135e23b29e690bfe867e028c..ebd591200fa6a02bdd75797798907205ac3eae4a 100644 (file)
@@ -147,7 +147,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.*")