mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Simplified union GIS tests with equals() rather than equals_exact().
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							21322f9271
						
					
				
				
					commit
					f24eea3b69
				
			| @@ -485,8 +485,5 @@ class GISFunctionsTests(TestCase): | ||||
|     def test_union(self): | ||||
|         geom = Point(-95.363151, 29.763374, srid=4326) | ||||
|         ptown = City.objects.annotate(union=functions.Union('point', geom)).get(name='Dallas') | ||||
|         tol = 0.00001 | ||||
|         # Undefined ordering | ||||
|         expected1 = fromstr('MULTIPOINT(-96.801611 32.782057,-95.363151 29.763374)', srid=4326) | ||||
|         expected2 = fromstr('MULTIPOINT(-95.363151 29.763374,-96.801611 32.782057)', srid=4326) | ||||
|         self.assertTrue(expected1.equals_exact(ptown.union, tol) or expected2.equals_exact(ptown.union, tol)) | ||||
|         expected = fromstr('MULTIPOINT(-96.801611 32.782057,-95.363151 29.763374)', srid=4326) | ||||
|         self.assertTrue(expected.equals(ptown.union)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user