Skip to content

Commit 69b5066

Browse files
committed
TST: skip some pytables tests with compress on windows/PY3
1 parent c329c3c commit 69b5066

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

pandas/io/tests/test_pytables.py

+26-15
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from pandas import (Series, DataFrame, Panel, MultiIndex, Categorical, bdate_range,
1414
date_range, timedelta_range, Index, DatetimeIndex, TimedeltaIndex, isnull)
1515

16+
from pandas.compat import is_platform_windows, PY3
1617
from pandas.io.pytables import _tables, TableIterator
1718
try:
1819
_tables()
@@ -48,6 +49,10 @@
4849

4950
_multiprocess_can_split_ = False
5051

52+
# testing on windows/py3 seems to fault
53+
# for using compression
54+
skip_compression = PY3 and is_platform_windows()
55+
5156
# contextmanager to ensure the file cleanup
5257
def safe_remove(path):
5358
if path is not None:
@@ -698,6 +703,9 @@ def test_put_compression(self):
698703

699704
def test_put_compression_blosc(self):
700705
tm.skip_if_no_package('tables', '2.2', app='blosc support')
706+
if skip_compression:
707+
raise nose.SkipTest("skipping on windows/PY3")
708+
701709
df = tm.makeTimeDataFrame()
702710

703711
with ensure_clean_store(self.path) as store:
@@ -2819,15 +2827,18 @@ def test_frame(self):
28192827
self._check_roundtrip_table(df, tm.assert_frame_equal)
28202828
self._check_roundtrip(df, tm.assert_frame_equal)
28212829

2822-
self._check_roundtrip_table(df, tm.assert_frame_equal,
2823-
compression=True)
2824-
self._check_roundtrip(df, tm.assert_frame_equal,
2825-
compression=True)
2830+
if not skip_compression:
2831+
self._check_roundtrip_table(df, tm.assert_frame_equal,
2832+
compression=True)
2833+
self._check_roundtrip(df, tm.assert_frame_equal,
2834+
compression=True)
28262835

28272836
tdf = tm.makeTimeDataFrame()
28282837
self._check_roundtrip(tdf, tm.assert_frame_equal)
2829-
self._check_roundtrip(tdf, tm.assert_frame_equal,
2830-
compression=True)
2838+
2839+
if not skip_compression:
2840+
self._check_roundtrip(tdf, tm.assert_frame_equal,
2841+
compression=True)
28312842

28322843
with ensure_clean_store(self.path) as store:
28332844
# not consolidated
@@ -2950,15 +2961,15 @@ def _make_one():
29502961
self._check_roundtrip(df1['bool1'], tm.assert_series_equal)
29512962
self._check_roundtrip(df1['int1'], tm.assert_series_equal)
29522963

2953-
# try with compression
2954-
self._check_roundtrip(df1['obj1'], tm.assert_series_equal,
2955-
compression=True)
2956-
self._check_roundtrip(df1['bool1'], tm.assert_series_equal,
2957-
compression=True)
2958-
self._check_roundtrip(df1['int1'], tm.assert_series_equal,
2959-
compression=True)
2960-
self._check_roundtrip(df1, tm.assert_frame_equal,
2961-
compression=True)
2964+
if not skip_compression:
2965+
self._check_roundtrip(df1['obj1'], tm.assert_series_equal,
2966+
compression=True)
2967+
self._check_roundtrip(df1['bool1'], tm.assert_series_equal,
2968+
compression=True)
2969+
self._check_roundtrip(df1['int1'], tm.assert_series_equal,
2970+
compression=True)
2971+
self._check_roundtrip(df1, tm.assert_frame_equal,
2972+
compression=True)
29622973

29632974
def test_wide(self):
29642975

0 commit comments

Comments
 (0)