Skip to content

Commit 8e4a6e7

Browse files
Debian Science Teamrebecca-palmer
Debian Science Team
authored andcommitted
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 <[email protected]> Forwarded: not-needed Gbp-Pq: Name stable_test_urls.patch
1 parent b66b766 commit 8e4a6e7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pandas/tests/io/excel/test_readers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ def test_bad_engine_raises(self, read_ext):
563563
@tm.network
564564
def test_read_from_http_url(self, read_ext):
565565
url = (
566-
"https://raw.githubusercontent.com/pandas-dev/pandas/master/"
566+
"https://raw.githubusercontent.com/pandas-dev/pandas/v1.0.3/"
567567
"pandas/tests/io/data/excel/test1" + read_ext
568568
)
569569
url_table = pd.read_excel(url)

pandas/tests/io/parser/test_common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ def test_url(all_parsers, csv_dir_path):
910910
kwargs = dict(sep="\t")
911911

912912
url = (
913-
"https://raw.github.com/pandas-dev/pandas/master/"
913+
"https://github.com/pandas-dev/pandas/raw/v1.0.3/"
914914
"pandas/tests/io/parser/data/salaries.csv"
915915
)
916916
url_result = parser.read_csv(url, **kwargs)

pandas/tests/io/parser/test_network.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def check_compressed_urls(salaries_table, compression, extension, mode, engine):
3232
# test reading compressed urls with various engines and
3333
# extension inference
3434
base_url = (
35-
"https://github.com/pandas-dev/pandas/raw/master/"
35+
"https://github.com/pandas-dev/pandas/raw/v1.0.3/"
3636
"pandas/tests/io/parser/data/salaries.csv"
3737
)
3838

pandas/tests/io/test_html.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def test_banklist_url(self):
134134
@tm.network
135135
def test_spam_url(self):
136136
url = (
137-
"https://raw.githubusercontent.com/pandas-dev/pandas/master/"
137+
"https://raw.githubusercontent.com/pandas-dev/pandas/v1.0.3/"
138138
"pandas/tests/io/data/html/spam.html"
139139
)
140140
df1 = self.read_html(url, ".*Water.*")

0 commit comments

Comments
 (0)