Skip to content

Commit 99d3556

Browse files
committed
use impororskip
1 parent ba88b31 commit 99d3556

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

pandas/tests/io/test_parquet.py

+2-8
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,10 @@ def test_write_with_index(self, engine):
123123
def test_compression(self, engine, compression):
124124

125125
if compression == 'snappy':
126-
try:
127-
import snappy # noqa
128-
except ImportError:
129-
pytest.skip("no snappy, skipping")
126+
pytest.importorskip('snappy')
130127

131128
elif compression == 'brotli':
132-
try:
133-
import brotli # noqa
134-
except ImportError:
135-
pytest.skip("no brotli, skipping")
129+
pytest.importorskip('brotli')
136130

137131
df = pd.DataFrame({'A': [1, 2, 3]})
138132
self.check_round_trip(df, engine, compression=compression)

0 commit comments

Comments
 (0)