Skip to content

Commit a2c4543

Browse files
dhimmelgfyoung
authored andcommitted
CLN: Remove import exception handling (#17218)
Imports should succeed on all versions of Python that pandas supports.
1 parent f165b90 commit a2c4543

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

pandas/tests/io/parser/compression.py

+3-12
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
class CompressionTests(object):
1414

1515
def test_zip(self):
16-
try:
17-
import zipfile
18-
except ImportError:
19-
pytest.skip('need zipfile to run')
16+
import zipfile
2017

2118
with open(self.csv1, 'rb') as data_file:
2219
data = data_file.read()
@@ -65,10 +62,7 @@ def test_zip(self):
6562
f, compression='zip')
6663

6764
def test_gzip(self):
68-
try:
69-
import gzip
70-
except ImportError:
71-
pytest.skip('need gzip to run')
65+
import gzip
7266

7367
with open(self.csv1, 'rb') as data_file:
7468
data = data_file.read()
@@ -94,10 +88,7 @@ def test_gzip(self):
9488
tm.assert_frame_equal(result, expected)
9589

9690
def test_bz2(self):
97-
try:
98-
import bz2
99-
except ImportError:
100-
pytest.skip('need bz2 to run')
91+
import bz2
10192

10293
with open(self.csv1, 'rb') as data_file:
10394
data = data_file.read()

0 commit comments

Comments
 (0)