mirror of
				https://github.com/django/django.git
				synced 2025-10-30 17:16:10 +00:00 
			
		
		
		
	Refs #35058 -- Added __repr__() to OGRGeomType.
This commit is contained in:
		| @@ -55,6 +55,9 @@ class OGRGeomType: | ||||
|         "Return the value of the name property." | ||||
|         return self.name | ||||
|  | ||||
|     def __repr__(self): | ||||
|         return f"<{self.__class__.__qualname__}: {self.name}>" | ||||
|  | ||||
|     def __eq__(self, other): | ||||
|         """ | ||||
|         Do an equivalence test on the OGR type with the given | ||||
|   | ||||
| @@ -58,6 +58,9 @@ class OGRGeomTest(SimpleTestCase, TestDataMixin): | ||||
|         self.assertEqual(0, gt.num) | ||||
|         self.assertEqual("Unknown", gt.name) | ||||
|  | ||||
|     def test_geom_type_repr(self): | ||||
|         self.assertEqual(repr(OGRGeomType("point")), "<OGRGeomType: Point>") | ||||
|  | ||||
|     def test_geomtype_25d(self): | ||||
|         "Testing OGRGeomType object with 25D types." | ||||
|         wkb25bit = OGRGeomType.wkb25bit | ||||
|   | ||||
		Reference in New Issue
	
	Block a user