#NEWLINE# def test_to_frame_expanddim( self ) : #NEWLINE# #INDENT# class SubclassedSeries ( Series ) : #NEWLINE# #INDENT# @ property #NEWLINE# def _constructor_expanddim( self ) : #NEWLINE# #INDENT# return SubclassedFrame #NEWLINE# #UNINDENT# #UNINDENT# class SubclassedFrame ( DataFrame ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# s = SubclassedSeries ( [ 1 , 2 , 3 ] , name = 'X' ) #NEWLINE# result = s . to_frame ( ) #NEWLINE# self . assertTrue ( isinstance ( result , SubclassedFrame ) ) #NEWLINE# expected = SubclassedFrame ( { #NEWLINE# #INDENT# 'X' : [ 1 , 2 , 3 ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert_frame_equal ( s , expected )