MCPcopy
hub / github.com/django/django / test_polygons_from_bbox

Method test_polygons_from_bbox

tests/gis_tests/geos_tests/test_geos.py:613–624  ·  view source on GitHub ↗

Testing `from_bbox` class method.

(self)

Source from the content-addressed store, hash-verified

611 )
612
613 def test_polygons_from_bbox(self):
614 "Testing `from_bbox` class method."
615 bbox = (-180, -90, 180, 90)
616 p = Polygon.from_bbox(bbox)
617 self.assertEqual(bbox, p.extent)
618
619 # Testing numerical precision
620 x = 3.14159265358979323
621 bbox = (0, 0, 1, x)
622 p = Polygon.from_bbox(bbox)
623 y = p.extent[-1]
624 self.assertEqual(format(x, ".13f"), format(y, ".13f"))
625
626 def test_polygons(self):
627 "Testing Polygon objects."

Callers

nothing calls this directly

Calls 2

formatFunction · 0.50
from_bboxMethod · 0.45

Tested by

no test coverage detected