示例#1
0
def test_h():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.h == 11
示例#2
0
def test_midtop():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.midtop == (int(1 + (5 / 2)), 3)
示例#3
0
def test_topright():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.topright == (1 + 5, 3)
示例#4
0
def test_bottom():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.bottom == 3 + 11
示例#5
0
def test_topleft():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.topleft == (1, 3)
示例#6
0
def test_midright():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.midright == (1 + 5, int(3 + (11 / 2)))
示例#7
0
def test_bottomright():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.bottomright == (1 + 5, 3 + 11)
示例#8
0
def test_centerx():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.centerx == int(1 + (5 / 2))
示例#9
0
def test_right():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.right == 1 + 5
示例#10
0
def test_y():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.y == 3
示例#11
0
def test_left():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.left == 1
示例#12
0
def test_w():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.w == 5
示例#13
0
def test_size():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.size == (5, 11)
示例#14
0
def test_width():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.width == 5
示例#15
0
def test_midleft():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.midleft == (1, int(3 + (11 / 2)))
示例#16
0
def test_top():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.top == 3
示例#17
0
def test_center():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.center == (int(1 + (5 / 2)), int(3 + (11 / 2)))
示例#18
0
def test_centery():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.centery == int(3 + (11 / 2))
示例#19
0
def test_bottomleft():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.bottomleft == (1, 3 + 11)
示例#20
0
def test_midbottom():
    bo = BaseObject(w=5, h=11, x=1, y=3)
    assert bo.midbottom == (int(1 + (5 / 2)), 3 + 11)