Skip to content

Commit b1dead0

Browse files
committed
Next attempt at trying to fix ResourceWarning
1 parent f37a98f commit b1dead0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pandas/tests/io/test_common.py

+3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ def test_stringify_path_fspath(self):
9999
])
100100
@pytest.mark.parametrize('path_type', path_types)
101101
def test_infer_compression_from_path(self, extension, expected, path_type):
102+
if compression == 'gzip':
103+
pytest.skip('trying to find unclosed socket causing that is '
104+
'causing a Resourcewarning')
102105
path = path_type('foo/bar.csv' + extension)
103106
compression = icom._infer_compression(path, compression='infer')
104107
assert compression == expected

pandas/tests/io/test_parquet.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,9 @@ def test_compression(self, engine, compression):
279279

280280
if compression == 'snappy':
281281
pytest.importorskip('snappy')
282+
282283
elif compression == 'brotli':
283284
pytest.importorskip('brotli')
284-
elif compression == 'gzip':
285-
pytest.skip(reason='trying to find unclosed socket causing that is'
286-
'causing a Resourcewarning')
287285

288286
df = pd.DataFrame({'A': [1, 2, 3]})
289287
check_round_trip(df, engine, write_kwargs={'compression': compression})

0 commit comments

Comments
 (0)