Testing `extent` on a table with a single point. See #11827.
(self)
| 42 | |
| 43 | @skipUnlessDBFeature("supports_extent_aggr") |
| 44 | def test_extent(self): |
| 45 | "Testing `extent` on a table with a single point. See #11827." |
| 46 | pnt = City.objects.get(name="Pueblo").point |
| 47 | ref_ext = (pnt.x, pnt.y, pnt.x, pnt.y) |
| 48 | extent = City.objects.filter(name="Pueblo").aggregate(Extent("point"))[ |
| 49 | "point__extent" |
| 50 | ] |
| 51 | for ref_val, val in zip(ref_ext, extent): |
| 52 | self.assertAlmostEqual(ref_val, val, 4) |
| 53 | |
| 54 | def test_unicode_date(self): |
| 55 | "Testing dates are converted properly, even on SpatiaLite. See #16408." |