Example #1
0
    def test_is_closed(self):
        poly = [(150.,20.), (-160.,30.), (-170.,10.), (170.,10.)]
        P = Polygon(3, poly)
        self.assertFalse(P.is_closed())

        poly1 = [(150.,20.), (-160.,30.), (-170.,10.), (170.,10.), (150.,20.)]
        P1 = Polygon(3, poly1)
        self.assertTrue(P1.is_closed())
Example #2
0
    def test_is_closed(self):
        poly = [(150., 20.), (-160., 30.), (-170., 10.), (170., 10.)]
        P = Polygon(3, poly)
        self.assertFalse(P.is_closed())

        poly1 = [(150., 20.), (-160., 30.), (-170., 10.), (170., 10.),
                 (150., 20.)]
        P1 = Polygon(3, poly1)
        self.assertTrue(P1.is_closed())