コード例 #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)