#NEWLINE# def test_basic( self ) : #NEWLINE# #INDENT# s1 = Street ( 'A' , 1 ) #NEWLINE# c0 = Combination ( 1 ) #NEWLINE# c0 . add ( s1 ) #NEWLINE# assert ( c3 . __class__ == Combination ) #NEWLINE# assert ( c0 . get ( ( - 1 ) ) == None ) #NEWLINE# assert ( c0 . get ( 0 ) . __class__ == Street ) #NEWLINE# assert ( c0 . get ( 1 ) == None ) #NEWLINE# assert ( c0 . walk ( State ( 0 , 0 ) , WalkOptions ( ) ) . weight == 0 ) #NEWLINE# s2 = Street ( 'B' , 2 ) #NEWLINE# c1 = Combination ( 2 ) #NEWLINE# c1 . add ( s1 ) #NEWLINE# c1 . add ( s2 ) #NEWLINE# assert ( c1 . __class__ == Combination ) #NEWLINE# assert ( c1 . get ( ( - 1 ) ) == None ) #NEWLINE# assert ( c1 . get ( 0 ) . __class__ == Street ) #NEWLINE# assert ( c1 . get ( 0 ) . name == 'A' ) #NEWLINE# assert ( c1 . get ( 1 ) . __class__ == Street ) #NEWLINE# assert ( c1 . get ( 1 ) . name == 'B' ) #NEWLINE# assert ( c1 . get ( 2 ) == None ) #NEWLINE# assert ( c1 . walk ( State ( 0 , 0 ) , WalkOptions ( ) ) . weight == 0 ) #NEWLINE# assert ( c1 . walk_back ( State ( 0 , 100 ) , WalkOptions ( ) ) . weight == 0 ) #NEWLINE# s3 = Street ( 'C' , 3 ) #NEWLINE# c2 = Combination ( 3 ) #NEWLINE# c2 . add ( s1 ) #NEWLINE# c2 . add ( s2 ) #NEWLINE# c2 . add ( s3 ) #NEWLINE# assert ( c2 . walk ( State ( 0 , 0 ) , WalkOptions ( ) ) . weight == 0 ) #NEWLINE# assert ( c2 . walk_back ( State ( 0 , 100 ) , WalkOptions ( ) ) . weight == 0 ) #NEWLINE# c3 = Combination ( 2 ) #NEWLINE# c3 . add ( c1 ) #NEWLINE# c3 . add ( s3 ) #NEWLINE# assert ( c3 . walk ( State ( 0 , 0 ) , WalkOptions ( ) ) . weight == 0 ) #NEWLINE# assert ( c3 . walk_back ( State ( 0 , 100 ) , WalkOptions ( ) ) . weight == 0 ) #NEWLINE# s1 . destroy ( ) #NEWLINE# s2 . destroy ( ) #NEWLINE# s3 . destroy ( ) #NEWLINE# c1 . destroy ( ) #NEWLINE# c2 . destroy ( )