1717 isna , compat , concat , Timestamp )
1818
1919import pandas .util .testing as tm
20+ import pandas .util ._test_decorators as td
2021from pandas .util .testing import (assert_panel4d_equal ,
2122 assert_panel_equal ,
2223 assert_frame_equal ,
2324 assert_series_equal ,
2425 set_timezone )
2526
2627from pandas .compat import (is_platform_windows , is_platform_little_endian ,
27- PY3 , PY35 , PY36 , BytesIO , text_type ,
28+ PY35 , PY36 , BytesIO , text_type ,
2829 range , lrange , u )
2930from pandas .io .formats .printing import pprint_thing
3031from pandas .core .dtypes .common import is_categorical_dtype
4041 LooseVersion ('2.2' ) else 'zlib' )
4142
4243
43- # testing on windows/py3 seems to fault
44- # for using compression
45- skip_compression = PY3 and is_platform_windows ()
46-
4744# contextmanager to ensure the file cleanup
4845
4946
@@ -719,12 +716,10 @@ def test_put_compression(self):
719716 pytest .raises (ValueError , store .put , 'b' , df ,
720717 format = 'fixed' , complib = 'zlib' )
721718
719+ @td .skip_if_windows_python_3
722720 def test_put_compression_blosc (self ):
723721 tm .skip_if_no_package ('tables' , min_version = '2.2' ,
724722 app = 'blosc support' )
725- if skip_compression :
726- pytest .skip ("skipping on windows/PY3" )
727-
728723 df = tm .makeTimeDataFrame ()
729724
730725 with ensure_clean_store (self .path ) as store :
@@ -2892,29 +2887,25 @@ def test_timeseries_preepoch(self):
28922887 except OverflowError :
28932888 pytest .skip ('known failer on some windows platforms' )
28942889
2895- def test_frame (self ):
2890+ @pytest .mark .parametrize ("compression" , [
2891+ False , pytest .param (True , marks = td .skip_if_windows_python_3 )
2892+ ])
2893+ def test_frame (self , compression ):
28962894
28972895 df = tm .makeDataFrame ()
28982896
28992897 # put in some random NAs
29002898 df .values [0 , 0 ] = np .nan
29012899 df .values [5 , 3 ] = np .nan
29022900
2903- self ._check_roundtrip_table (df , tm .assert_frame_equal )
2904- self ._check_roundtrip (df , tm .assert_frame_equal )
2905-
2906- if not skip_compression :
2907- self ._check_roundtrip_table (df , tm .assert_frame_equal ,
2908- compression = True )
2909- self ._check_roundtrip (df , tm .assert_frame_equal ,
2910- compression = True )
2901+ self ._check_roundtrip_table (df , tm .assert_frame_equal ,
2902+ compression = compression )
2903+ self ._check_roundtrip (df , tm .assert_frame_equal ,
2904+ compression = compression )
29112905
29122906 tdf = tm .makeTimeDataFrame ()
2913- self ._check_roundtrip (tdf , tm .assert_frame_equal )
2914-
2915- if not skip_compression :
2916- self ._check_roundtrip (tdf , tm .assert_frame_equal ,
2917- compression = True )
2907+ self ._check_roundtrip (tdf , tm .assert_frame_equal ,
2908+ compression = compression )
29182909
29192910 with ensure_clean_store (self .path ) as store :
29202911 # not consolidated
@@ -3021,7 +3012,10 @@ def test_store_series_name(self):
30213012 recons = store ['series' ]
30223013 tm .assert_series_equal (recons , series )
30233014
3024- def test_store_mixed (self ):
3015+ @pytest .mark .parametrize ("compression" , [
3016+ False , pytest .param (True , marks = td .skip_if_windows_python_3 )
3017+ ])
3018+ def test_store_mixed (self , compression ):
30253019
30263020 def _make_one ():
30273021 df = tm .makeDataFrame ()
@@ -3046,19 +3040,12 @@ def _make_one():
30463040 tm .assert_frame_equal (store ['obj' ], df2 )
30473041
30483042 # check that can store Series of all of these types
3049- self ._check_roundtrip (df1 ['obj1' ], tm .assert_series_equal )
3050- self ._check_roundtrip (df1 ['bool1' ], tm .assert_series_equal )
3051- self ._check_roundtrip (df1 ['int1' ], tm .assert_series_equal )
3052-
3053- if not skip_compression :
3054- self ._check_roundtrip (df1 ['obj1' ], tm .assert_series_equal ,
3055- compression = True )
3056- self ._check_roundtrip (df1 ['bool1' ], tm .assert_series_equal ,
3057- compression = True )
3058- self ._check_roundtrip (df1 ['int1' ], tm .assert_series_equal ,
3059- compression = True )
3060- self ._check_roundtrip (df1 , tm .assert_frame_equal ,
3061- compression = True )
3043+ self ._check_roundtrip (df1 ['obj1' ], tm .assert_series_equal ,
3044+ compression = compression )
3045+ self ._check_roundtrip (df1 ['bool1' ], tm .assert_series_equal ,
3046+ compression = compression )
3047+ self ._check_roundtrip (df1 ['int1' ], tm .assert_series_equal ,
3048+ compression = compression )
30623049
30633050 def test_wide (self ):
30643051
@@ -5639,6 +5626,7 @@ def test_fixed_offset_tz(self):
56395626 tm .assert_index_equal (recons .index , rng )
56405627 assert rng .tz == recons .index .tz
56415628
5629+ @td .skip_if_windows
56425630 def test_store_timezone (self ):
56435631 # GH2852
56445632 # issue storing datetime.date with a timezone as it resets when read
0 commit comments