Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove import exception handling #17218

Merged
merged 1 commit into from
Aug 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions pandas/tests/io/parser/compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down