Testing `from_bbox` class method.
(self)
| 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." |