File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 22
33import  unittest 
44import  pycaching 
5+ from  geopy .distance  import  great_circle 
56from  pycaching .errors  import  LoginFailedException , GeocodeError , PMOnlyException 
67from  pycaching  import  Geocaching 
78from  pycaching  import  Cache 
@@ -22,9 +23,9 @@ def setUpClass(cls):
2223    def  test_geocode (self ):
2324        pilsen  =  Point (49.74774 , 13.37752 )
2425        with  self .subTest ("existing location" ):
25-             self .assertEqual ( self .g .geocode ("Pilsen" ), pilsen )
26-             self .assertEqual ( self .g .geocode ("Plzeň" ), pilsen )
27-             self .assertEqual ( self .g .geocode ("plzen" ), pilsen )
26+             self .assertLess ( great_circle ( self .g .geocode ("Pilsen" ), pilsen ). miles ,  10 )
27+             self .assertLess ( great_circle ( self .g .geocode ("Plzeň" ), pilsen ). miles ,  10 )
28+             self .assertLess ( great_circle ( self .g .geocode ("plzen" ), pilsen ). miles ,  10 )
2829
2930        with  self .subTest ("non-existing location" ):
3031            with  self .assertRaises (GeocodeError ):
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments