Ticket #10380: gis_envelope_min_max.diff
File gis_envelope_min_max.diff, 1.6 KB (added by , 16 years ago) |
---|
-
django/contrib/gis/tests/test_gdal_envelope.py
15 15 self.assertRaises(OGRException, Envelope, ()) 16 16 self.assertRaises(ValueError, Envelope, 0, 'a', 5, 5) 17 17 self.assertRaises(TypeError, Envelope, u'foo') 18 self.assertRaises(OGRException, Envelope, (1, 1, 0, 0)) 19 try: 20 Envelope(0, 0, 0, 0) 21 except OGRException: 22 self.fail('shouldn\'t raise an exception for min_x == max_x or min_y == max_y') 18 23 19 24 def test02_properties(self): 20 25 "Testing Envelope properties." -
django/contrib/gis/gdal/envelope.py
58 58 raise OGRException('Incorrect number (%d) of arguments.' % len(args)) 59 59 60 60 # Checking the x,y coordinates 61 if self.min_x > =self.max_x:62 raise OGRException('Envelope minimum X > =maximum X.')63 if self.min_y > =self.max_y:64 raise OGRException('Envelope minimum Y > =maximum Y.')61 if self.min_x > self.max_x: 62 raise OGRException('Envelope minimum X > maximum X.') 63 if self.min_y > self.max_y: 64 raise OGRException('Envelope minimum Y > maximum Y.') 65 65 66 66 def __eq__(self, other): 67 67 """