TST: Create compressed salary testing data (#14587)
This commit is contained in:
parent
06b35db1d8
commit
85a6464407
|
@ -630,10 +630,10 @@ bar"""
|
|||
def test_url(self):
|
||||
# HTTP(S)
|
||||
url = ('https://raw.github.com/pandas-dev/pandas/master/'
|
||||
'pandas/io/tests/parser/data/salary.table.csv')
|
||||
'pandas/io/tests/parser/data/salaries.csv')
|
||||
url_table = self.read_table(url)
|
||||
dirpath = tm.get_data_path()
|
||||
localtable = os.path.join(dirpath, 'salary.table.csv')
|
||||
localtable = os.path.join(dirpath, 'salaries.csv')
|
||||
local_table = self.read_table(localtable)
|
||||
tm.assert_frame_equal(url_table, local_table)
|
||||
# TODO: ftp testing
|
||||
|
@ -641,7 +641,7 @@ bar"""
|
|||
@tm.slow
|
||||
def test_file(self):
|
||||
dirpath = tm.get_data_path()
|
||||
localtable = os.path.join(dirpath, 'salary.table.csv')
|
||||
localtable = os.path.join(dirpath, 'salaries.csv')
|
||||
local_table = self.read_table(localtable)
|
||||
|
||||
try:
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -18,19 +18,19 @@ class TestUrlGz(tm.TestCase):
|
|||
|
||||
def setUp(self):
|
||||
dirpath = tm.get_data_path()
|
||||
localtable = os.path.join(dirpath, 'salary.table.csv')
|
||||
localtable = os.path.join(dirpath, 'salaries.csv')
|
||||
self.local_table = read_table(localtable)
|
||||
|
||||
@tm.network
|
||||
def test_url_gz(self):
|
||||
url = ('https://raw.github.com/pandas-dev/pandas/'
|
||||
'master/pandas/io/tests/parser/data/salary.table.gz')
|
||||
'master/pandas/io/tests/parser/data/salaries.csv.gz')
|
||||
url_table = read_table(url, compression="gzip", engine="python")
|
||||
tm.assert_frame_equal(url_table, self.local_table)
|
||||
|
||||
@tm.network
|
||||
def test_url_gz_infer(self):
|
||||
url = 'https://s3.amazonaws.com/pandas-test/salary.table.gz'
|
||||
url = 'https://s3.amazonaws.com/pandas-test/salaries.csv.gz'
|
||||
url_table = read_table(url, compression="infer", engine="python")
|
||||
tm.assert_frame_equal(url_table, self.local_table)
|
||||
|
||||
|
|
Loading…
Reference in New Issue