Skip to content

Commit 759d48d

Browse files
committed
Create compressed salary testing data.
Create compressed versions of the salary dataset for testing pandas-dev#14576. Rename `salary.table.csv` to `salaries.tsv` because the dataset is tab rather than comma delimited. Remove the word table because it's implied by the extension. Rename `salary.table.gz` to `salaries.tsv.gz`, since compressed files should append to not strip the original extension. Created new files by running the following commands: ```sh cd pandas/io/tests/parser/data bzip2 --keep salaries.tsv xz --keep salaries.tsv zip salaries.tsv.zip salaries.tsv ```
1 parent 7a2bcb6 commit 759d48d

File tree

7 files changed

+6
-6
lines changed

7 files changed

+6
-6
lines changed

pandas/io/tests/parser/common.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -630,18 +630,18 @@ def test_read_csv_parse_simple_list(self):
630630
def test_url(self):
631631
# HTTP(S)
632632
url = ('https://raw.github.com/pandas-dev/pandas/master/'
633-
'pandas/io/tests/parser/data/salary.table.csv')
633+
'pandas/io/tests/parser/data/salaries.tsv')
634634
url_table = self.read_table(url)
635635
dirpath = tm.get_data_path()
636-
localtable = os.path.join(dirpath, 'salary.table.csv')
636+
localtable = os.path.join(dirpath, 'salaries.tsv')
637637
local_table = self.read_table(localtable)
638638
tm.assert_frame_equal(url_table, local_table)
639639
# TODO: ftp testing
640640

641641
@tm.slow
642642
def test_file(self):
643643
dirpath = tm.get_data_path()
644-
localtable = os.path.join(dirpath, 'salary.table.csv')
644+
localtable = os.path.join(dirpath, 'salaries.tsv')
645645
local_table = self.read_table(localtable)
646646

647647
try:
283 Bytes
Binary file not shown.
336 Bytes
Binary file not shown.
445 Bytes
Binary file not shown.

pandas/io/tests/parser/test_network.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ class TestUrlGz(tm.TestCase):
1818

1919
def setUp(self):
2020
dirpath = tm.get_data_path()
21-
localtable = os.path.join(dirpath, 'salary.table.csv')
21+
localtable = os.path.join(dirpath, 'salaries.tsv')
2222
self.local_table = read_table(localtable)
2323

2424
@tm.network
2525
def test_url_gz(self):
2626
url = ('https://raw.github.com/pandas-dev/pandas/'
27-
'master/pandas/io/tests/parser/data/salary.table.gz')
27+
'master/pandas/io/tests/parser/data/salaries.tsv.gz')
2828
url_table = read_table(url, compression="gzip", engine="python")
2929
tm.assert_frame_equal(url_table, self.local_table)
3030

3131
@tm.network
3232
def test_url_gz_infer(self):
33-
url = 'https://s3.amazonaws.com/pandas-test/salary.table.gz'
33+
url = 'https://s3.amazonaws.com/pandas-test/salaries.tsv.gz'
3434
url_table = read_table(url, compression="infer", engine="python")
3535
tm.assert_frame_equal(url_table, self.local_table)
3636

0 commit comments

Comments
 (0)