@@ -20,23 +20,22 @@ class TestABCClasses(tm.TestCase):
2020 sparse_array = pd .SparseArray (np .random .randn (10 ))
2121
2222 def test_abc_types (self ):
23- self .assertIsInstance (pd .Index (['a' , 'b' , 'c' ]), gt .ABCIndex )
24- self .assertIsInstance (pd .Int64Index ([1 , 2 , 3 ]), gt .ABCInt64Index )
25- self .assertIsInstance (pd .UInt64Index ([1 , 2 , 3 ]), gt .ABCUInt64Index )
26- self .assertIsInstance (pd .Float64Index ([1 , 2 , 3 ]), gt .ABCFloat64Index )
27- self .assertIsInstance (self .multi_index , gt .ABCMultiIndex )
28- self .assertIsInstance (self .datetime_index , gt .ABCDatetimeIndex )
29- self .assertIsInstance (self .timedelta_index , gt .ABCTimedeltaIndex )
30- self .assertIsInstance (self .period_index , gt .ABCPeriodIndex )
31- self .assertIsInstance (self .categorical_df .index ,
32- gt .ABCCategoricalIndex )
33- self .assertIsInstance (pd .Index (['a' , 'b' , 'c' ]), gt .ABCIndexClass )
34- self .assertIsInstance (pd .Int64Index ([1 , 2 , 3 ]), gt .ABCIndexClass )
35- self .assertIsInstance (pd .Series ([1 , 2 , 3 ]), gt .ABCSeries )
36- self .assertIsInstance (self .df , gt .ABCDataFrame )
23+ assert isinstance (pd .Index (['a' , 'b' , 'c' ]), gt .ABCIndex )
24+ assert isinstance (pd .Int64Index ([1 , 2 , 3 ]), gt .ABCInt64Index )
25+ assert isinstance (pd .UInt64Index ([1 , 2 , 3 ]), gt .ABCUInt64Index )
26+ assert isinstance (pd .Float64Index ([1 , 2 , 3 ]), gt .ABCFloat64Index )
27+ assert isinstance (self .multi_index , gt .ABCMultiIndex )
28+ assert isinstance (self .datetime_index , gt .ABCDatetimeIndex )
29+ assert isinstance (self .timedelta_index , gt .ABCTimedeltaIndex )
30+ assert isinstance (self .period_index , gt .ABCPeriodIndex )
31+ assert isinstance (self .categorical_df .index , gt .ABCCategoricalIndex )
32+ assert isinstance (pd .Index (['a' , 'b' , 'c' ]), gt .ABCIndexClass )
33+ assert isinstance (pd .Int64Index ([1 , 2 , 3 ]), gt .ABCIndexClass )
34+ assert isinstance (pd .Series ([1 , 2 , 3 ]), gt .ABCSeries )
35+ assert isinstance (self .df , gt .ABCDataFrame )
3736 with catch_warnings (record = True ):
38- self . assertIsInstance (self .df .to_panel (), gt .ABCPanel )
39- self . assertIsInstance (self .sparse_series , gt .ABCSparseSeries )
40- self . assertIsInstance (self .sparse_array , gt .ABCSparseArray )
41- self . assertIsInstance (self .categorical , gt .ABCCategorical )
42- self . assertIsInstance (pd .Period ('2012' , freq = 'A-DEC' ), gt .ABCPeriod )
37+ assert isinstance (self .df .to_panel (), gt .ABCPanel )
38+ assert isinstance (self .sparse_series , gt .ABCSparseSeries )
39+ assert isinstance (self .sparse_array , gt .ABCSparseArray )
40+ assert isinstance (self .categorical , gt .ABCCategorical )
41+ assert isinstance (pd .Period ('2012' , freq = 'A-DEC' ), gt .ABCPeriod )
0 commit comments