Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
    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)
Exemplo n.º 4
0
    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)