Skip to content

Commit 941be37

Browse files
authored
fix: test_compression_size_fh
1 parent e66826b commit 941be37

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas/tests/io/test_compression.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ def test_compression_size(obj, method, compression_only):
5656
@pytest.mark.parametrize("method", ["to_csv", "to_json"])
5757
def test_compression_size_fh(obj, method, compression_only):
5858
with tm.ensure_clean() as path:
59-
with icom.get_handle(path, "w", compression=compression_only) as handles:
59+
with icom.get_handle(
60+
path,
61+
"w:gz" if compression_only == "tar" else "w",
62+
compression=compression_only,
63+
) as handles:
6064
getattr(obj, method)(handles.handle)
6165
assert not handles.handle.closed
6266
compressed_size = os.path.getsize(path)

0 commit comments

Comments
 (0)