Beispiel #1
0
 def setUp(self):
     # setup a simple region
     self.region = Region((0, 0, 1, 1))
     self.four_points = [
         Point(.1, .1),
         Point(.2, .2),
         Point(.3, .3),
         Point(.4, .4)
     ]
     self.more_points = [
         Point(.1, .2),
         Point(.2, .3),
         Point(.3, .4),
         Point(.4, .5)
     ]
Beispiel #2
0
 def test_init(self):
     # test constructor in regular manner
     Region((0, 0, 1, 1))
     # test inverted rectangle
     self.assertRaises(ValueError, Region, (1, 1, 0, 0))