1313from 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
16+ from pandas .compat import is_platform_windows , PY3 , PY35
1717from pandas .io .pytables import _tables , TableIterator
1818try :
1919 _tables ()
@@ -2574,7 +2574,7 @@ def test_tuple_index(self):
25742574 data = np .random .randn (30 ).reshape ((3 , 10 ))
25752575 DF = DataFrame (data , index = idx , columns = col )
25762576
2577- expected_warning = Warning if compat . PY35 else PerformanceWarning
2577+ expected_warning = Warning if PY35 else PerformanceWarning
25782578 with tm .assert_produces_warning (expected_warning = expected_warning , check_stacklevel = False ):
25792579 self ._check_roundtrip (DF , tm .assert_frame_equal )
25802580
@@ -2588,7 +2588,7 @@ def test_index_types(self):
25882588 check_series_type = True )
25892589
25902590 # nose has a deprecation warning in 3.5
2591- expected_warning = Warning if compat . PY35 else PerformanceWarning
2591+ expected_warning = Warning if PY35 else PerformanceWarning
25922592 with tm .assert_produces_warning (expected_warning = expected_warning , check_stacklevel = False ):
25932593 ser = Series (values , [0 , 'y' ])
25942594 self ._check_roundtrip (ser , func )
@@ -3393,7 +3393,7 @@ def test_retain_index_attributes2(self):
33933393
33943394 with ensure_clean_path (self .path ) as path :
33953395
3396- expected_warning = Warning if compat . PY35 else AttributeConflictWarning
3396+ expected_warning = Warning if PY35 else AttributeConflictWarning
33973397 with tm .assert_produces_warning (expected_warning = expected_warning , check_stacklevel = False ):
33983398
33993399 df = DataFrame (dict (A = Series (lrange (3 ), index = date_range ('2000-1-1' ,periods = 3 ,freq = 'H' ))))
@@ -4106,6 +4106,11 @@ def test_pytables_native_read(self):
41064106 d2 = store ['detector/readout' ]
41074107 self .assertIsInstance (d2 , DataFrame )
41084108
4109+ def test_pytables_native2_read (self ):
4110+ # fails on win/3.5 oddly
4111+ if PY35 and is_platform_windows ():
4112+ raise nose .SkipTest ("native2 read fails oddly on windows / 3.5" )
4113+
41094114 with ensure_clean_store (tm .get_data_path ('legacy_hdf/pytables_native2.h5' ), mode = 'r' ) as store :
41104115 str (store )
41114116 d1 = store ['detector' ]
0 commit comments