#NEWLINE# def test_distance( self ) : #NEWLINE# #INDENT# coordinate_pairs = { #NEWLINE# #INDENT# 1 : [ [ 10 , 10 ] , [ 10 , 10 ] ] , #NEWLINE# 2 : [ [ 33.755 , 84.39 ] , [ 40.7127 , 74.0059 ] ] , #NEWLINE# 3 : [ [ 0 , 0 ] , [ 0 , 0 ] ] , #NEWLINE# 4 : [ [ ( - 33.755 ) , ( - 84.39 ) ] , [ 40.7127 , 74.0059 ] ] , #NEWLINE# #UNINDENT# } #NEWLINE# results = { #NEWLINE# #INDENT# 1 : 0.0 , #NEWLINE# 2 : 1200.0 , #NEWLINE# 3 : 0.0 , #NEWLINE# 4 : 17959 , #NEWLINE# #UNINDENT# } #NEWLINE# for coordinate_pair in coordinate_pairs : #NEWLINE# #INDENT# ( source , destination ) = coordinate_pairs [ coordinate_pair ] #NEWLINE# expected = results [ coordinate_pair ] #NEWLINE# got = round ( bt . distance ( source , destination ) ) #NEWLINE# self . assertTrue ( ( expected == got ) )