def testSimpleFloat(self): pts = [[-1., -1.], [1., 1.]] centre = geom.findcentre(pts) self.assertEqual(centre[0], 0) self.assertEqual(centre[1], 0)
def testNonZeroCentre(self): pts = [[-4, -1], [0, 1]] centre = geom.findcentre(pts) self.assertEqual(centre[0], -2) self.assertEqual(centre[1], 0)
def testNonZeroCentre(self): pts = [[-4,-1],[0,1]] centre = geom.findcentre(pts) self.assertEqual(centre[0], -2) self.assertEqual(centre[1], 0)
def testSimple(self): pts = [[-1, -1], [1, 1]] centre = geom.findcentre(pts) self.assertEqual(centre[0], 0) self.assertEqual(centre[1], 0)
def testSimpleFloat(self): pts = [[-1.,-1.],[1.,1.]] centre = geom.findcentre(pts) self.assertEqual(centre[0], 0) self.assertEqual(centre[1], 0)
def testSimple(self): pts = [[-1,-1],[1,1]] centre = geom.findcentre(pts) self.assertEqual(centre[0], 0) self.assertEqual(centre[1], 0)
def testNonZeroCentre(self): pts = [[-4,-1],[0,1]] centre = geom.findcentre(pts) assert centre[0] == -2 assert centre[1] == 0
def testSimpleFloat(self): pts = [[-1.,-1.],[1.,1.]] centre = geom.findcentre(pts) assert centre[0] == 0 assert centre[1] == 0
def testSimple(self): pts = [[-1,-1],[1,1]] centre = geom.findcentre(pts) assert centre[0] == 0 assert centre[1] == 0