13
13
from pandas import (Series , DataFrame , Panel , MultiIndex , Categorical , bdate_range ,
14
14
date_range , timedelta_range , Index , DatetimeIndex , TimedeltaIndex , isnull )
15
15
16
- from pandas .compat import is_platform_windows , PY3
16
+ from pandas .compat import is_platform_windows , PY3 , PY35
17
17
from pandas .io .pytables import _tables , TableIterator
18
18
try :
19
19
_tables ()
@@ -2574,7 +2574,7 @@ def test_tuple_index(self):
2574
2574
data = np .random .randn (30 ).reshape ((3 , 10 ))
2575
2575
DF = DataFrame (data , index = idx , columns = col )
2576
2576
2577
- expected_warning = Warning if compat . PY35 else PerformanceWarning
2577
+ expected_warning = Warning if PY35 else PerformanceWarning
2578
2578
with tm .assert_produces_warning (expected_warning = expected_warning , check_stacklevel = False ):
2579
2579
self ._check_roundtrip (DF , tm .assert_frame_equal )
2580
2580
@@ -2588,7 +2588,7 @@ def test_index_types(self):
2588
2588
check_series_type = True )
2589
2589
2590
2590
# 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
2592
2592
with tm .assert_produces_warning (expected_warning = expected_warning , check_stacklevel = False ):
2593
2593
ser = Series (values , [0 , 'y' ])
2594
2594
self ._check_roundtrip (ser , func )
@@ -3393,7 +3393,7 @@ def test_retain_index_attributes2(self):
3393
3393
3394
3394
with ensure_clean_path (self .path ) as path :
3395
3395
3396
- expected_warning = Warning if compat . PY35 else AttributeConflictWarning
3396
+ expected_warning = Warning if PY35 else AttributeConflictWarning
3397
3397
with tm .assert_produces_warning (expected_warning = expected_warning , check_stacklevel = False ):
3398
3398
3399
3399
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):
4106
4106
d2 = store ['detector/readout' ]
4107
4107
self .assertIsInstance (d2 , DataFrame )
4108
4108
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
+
4109
4114
with ensure_clean_store (tm .get_data_path ('legacy_hdf/pytables_native2.h5' ), mode = 'r' ) as store :
4110
4115
str (store )
4111
4116
d1 = store ['detector' ]
0 commit comments