def testBoundingBoxFalse(self): cc = Chaincode([0, 0], "002") boundingbox = [[-1, 0], [-1, 0]] self.failIf(np.all(cc.BoundingBox() != np.array(boundingbox)))
def testBoundingBox(self): #needs of np.array... I think cc = Chaincode([0, 0], "00033344") boundingbox = [[-3, 2], [-3, 0]] # [[x0,x1],[y0,y1]] (like cc) self.failUnless(np.all(cc.BoundingBox() == np.array(boundingbox)))