#NEWLINE# def test_repr( self ) : #NEWLINE# #INDENT# i = RangeIndex ( 5 , name = 'Foo' ) #NEWLINE# result = repr ( self ) #NEWLINE# if PY3 : #NEWLINE# #INDENT# expected = "RangeIndex(start=0, stop=5, step=1, name='Foo')" #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# expected = "RangeIndex(start=0, stop=5, step=1, name=u'Foo')" #NEWLINE# #UNINDENT# self . assertTrue ( result , expected ) #NEWLINE# result = eval ( result ) #NEWLINE# self . assertTrue ( result . equals ( i ) ) #NEWLINE# i = RangeIndex ( 5 , 0 , ( - 1 ) ) #NEWLINE# result = repr ( i ) #NEWLINE# expected = 'RangeIndex(start=5, stop=0, step=-1)' #NEWLINE# self . assertEqual ( result , expected ) #NEWLINE# result = eval ( result ) #NEWLINE# self . assertTrue ( result . equals ( i ) )