Skip to content
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