From a2c454373b8cd2334b93a68d52104e9cbcdd3721 Mon Sep 17 00:00:00 2001 From: Daniel Himmelstein Date: Thu, 10 Aug 2017 16:43:37 -0400 Subject: [PATCH] CLN: Remove import exception handling (#17218) Imports should succeed on all versions of Python that pandas supports. --- pandas/tests/io/parser/compression.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pandas/tests/io/parser/compression.py b/pandas/tests/io/parser/compression.py index 55c0506acb132..797c12139656d 100644 --- a/pandas/tests/io/parser/compression.py +++ b/pandas/tests/io/parser/compression.py @@ -13,10 +13,7 @@ class CompressionTests(object): def test_zip(self): - try: - import zipfile - except ImportError: - pytest.skip('need zipfile to run') + import zipfile with open(self.csv1, 'rb') as data_file: data = data_file.read() @@ -65,10 +62,7 @@ def test_zip(self): f, compression='zip') def test_gzip(self): - try: - import gzip - except ImportError: - pytest.skip('need gzip to run') + import gzip with open(self.csv1, 'rb') as data_file: data = data_file.read() @@ -94,10 +88,7 @@ def test_gzip(self): tm.assert_frame_equal(result, expected) def test_bz2(self): - try: - import bz2 - except ImportError: - pytest.skip('need bz2 to run') + import bz2 with open(self.csv1, 'rb') as data_file: data = data_file.read()