@@ -917,25 +917,25 @@ def test_constructor(self):
917
917
with catch_warnings (record = True ):
918
918
# with BlockManager
919
919
wp = Panel (self .panel ._data )
920
- self . assertIs ( wp ._data , self .panel ._data )
920
+ assert wp ._data is self .panel ._data
921
921
922
922
wp = Panel (self .panel ._data , copy = True )
923
- self . assertIsNot ( wp ._data , self .panel ._data )
924
- assert_panel_equal (wp , self .panel )
923
+ assert wp ._data is not self .panel ._data
924
+ tm . assert_panel_equal (wp , self .panel )
925
925
926
926
# strings handled prop
927
927
wp = Panel ([[['foo' , 'foo' , 'foo' , ], ['foo' , 'foo' , 'foo' ]]])
928
- self . assertEqual ( wp .values .dtype , np .object_ )
928
+ assert wp .values .dtype == np .object_
929
929
930
930
vals = self .panel .values
931
931
932
932
# no copy
933
933
wp = Panel (vals )
934
- self . assertIs ( wp .values , vals )
934
+ assert wp .values is vals
935
935
936
936
# copy
937
937
wp = Panel (vals , copy = True )
938
- self . assertIsNot ( wp .values , vals )
938
+ assert wp .values is not vals
939
939
940
940
# GH #8285, test when scalar data is used to construct a Panel
941
941
# if dtype is not passed, it should be inferred
@@ -946,15 +946,17 @@ def test_constructor(self):
946
946
minor_axis = range (4 ))
947
947
vals = np .empty ((2 , 3 , 4 ), dtype = dtype )
948
948
vals .fill (val )
949
- assert_panel_equal (wp , Panel (vals , dtype = dtype ))
949
+
950
+ tm .assert_panel_equal (wp , Panel (vals , dtype = dtype ))
950
951
951
952
# test the case when dtype is passed
952
953
wp = Panel (1 , items = range (2 ), major_axis = range (3 ),
953
954
minor_axis = range (4 ),
954
955
dtype = 'float32' )
955
956
vals = np .empty ((2 , 3 , 4 ), dtype = 'float32' )
956
957
vals .fill (1 )
957
- assert_panel_equal (wp , Panel (vals , dtype = 'float32' ))
958
+
959
+ tm .assert_panel_equal (wp , Panel (vals , dtype = 'float32' ))
958
960
959
961
def test_constructor_cast (self ):
960
962
with catch_warnings (record = True ):
0 commit comments