Skip to content

Commit 04886e9

Browse files
committed
remove value error test cases now that zip compression is supported for csv and json
1 parent 437d716 commit 04886e9

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

pandas/tests/frame/test_to_csv.py

-14
Original file line numberDiff line numberDiff line change
@@ -943,20 +943,6 @@ def test_to_csv_compression(self, compression):
943943
with tm.decompress_file(filename, compression) as fh:
944944
assert_frame_equal(df, read_csv(fh, index_col=0))
945945

946-
@pytest.mark.xfail(reason='zip compression is now supported for csv.')
947-
def test_to_csv_compression_value_error(self):
948-
# GH7615
949-
# use the compression kw in to_csv
950-
df = DataFrame([[0.123456, 0.234567, 0.567567],
951-
[12.32112, 123123.2, 321321.2]],
952-
index=['A', 'B'], columns=['X', 'Y', 'Z'])
953-
954-
with ensure_clean() as filename:
955-
# zip compression is not supported and should raise ValueError
956-
import zipfile
957-
pytest.raises(zipfile.BadZipfile, df.to_csv,
958-
filename, compression="zip")
959-
960946
def test_to_csv_date_format(self):
961947
with ensure_clean('__tmp_to_csv_date_format__') as path:
962948
dt_index = self.tsframe.index

pandas/tests/io/json/test_compression.py

-11
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,6 @@ def test_compression_roundtrip(compression):
2121
assert_frame_equal(df, pd.read_json(result))
2222

2323

24-
@pytest.mark.xfail(reason='zip compression is now supported for json.')
25-
def test_compress_zip_value_error():
26-
df = pd.DataFrame([[0.123456, 0.234567, 0.567567],
27-
[12.32112, 123123.2, 321321.2]],
28-
index=['A', 'B'], columns=['X', 'Y', 'Z'])
29-
30-
with tm.ensure_clean() as path:
31-
import zipfile
32-
pytest.raises(zipfile.BadZipfile, df.to_json, path, compression="zip")
33-
34-
3524
def test_read_zipped_json():
3625
uncompressed_path = tm.get_data_path("tsframe_v012.json")
3726
uncompressed_df = pd.read_json(uncompressed_path)

0 commit comments

Comments
 (0)