MCPcopy
hub / github.com/django/django / test_extent

Method test_extent

tests/gis_tests/geoapp/test_regress.py:44–52  ·  view source on GitHub ↗

Testing `extent` on a table with a single point. See #11827.

(self)

Source from the content-addressed store, hash-verified

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."

Callers

nothing calls this directly

Calls 4

ExtentClass · 0.90
aggregateMethod · 0.80
getMethod · 0.45
filterMethod · 0.45

Tested by

no test coverage detected