def testSameRect(self): "both rectangles are the same so false" other = DummyCtrl(10, 20, 200, 40) this = DummyCtrl(10, 20, 200, 40) result = findbestmatch.is_above_or_to_left(this, other) self.assertEqual(result, False)
def testLeftAndTop(self): other = DummyCtrl(5, 10, 200, 20) this = DummyCtrl(10, 20, 200, 40) result = findbestmatch.is_above_or_to_left(this, other) self.assertEqual(result, True)
def testTopLeftInSideControl(self): other = DummyCtrl(15, 25, 120, 40) this = DummyCtrl(10, 20, 20, 40) result = findbestmatch.is_above_or_to_left(this, other) self.assertEqual(result, False)
def testToRight(self): other = DummyCtrl(110, 20, 120, 40) this = DummyCtrl(10, 20, 20, 40) result = findbestmatch.is_above_or_to_left(this, other) self.assertEqual(result, False)
def testBelow(self): other = DummyCtrl(10, 120, 200, 140) this = DummyCtrl(10, 20, 20, 40) result = findbestmatch.is_above_or_to_left(this, other) self.assertEqual(result, False)