File: test_singularity.py

package info (click to toggle)
python-shapely 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,528 kB
  • sloc: python: 18,648; ansic: 6,615; makefile: 88; sh: 62
file content (15 lines) | stat: -rw-r--r-- 381 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import unittest

from shapely.geometry import Polygon


class PolygonTestCase(unittest.TestCase):
    def test_polygon_3(self):
        p = (1.0, 1.0)
        poly = Polygon([p, p, p])
        assert poly.bounds == (1.0, 1.0, 1.0, 1.0)

    def test_polygon_5(self):
        p = (1.0, 1.0)
        poly = Polygon([p, p, p, p, p])
        assert poly.bounds == (1.0, 1.0, 1.0, 1.0)