Beispiel #1
0
def test_get_team_name_y_position():
    layout = Layout(width=1000, height=800)
    text = Surface(100, 50)
    y = layout._get_team_name_y_position(text)
    assert y == (350 - 50 / 2)
Beispiel #2
0
def test_get_team_logo_y_center_position():
    layout = Layout(width=1000, height=800)
    y = layout._get_team_logo_y_center_position()
    assert y == 200
Beispiel #3
0
def test_get_team_set_score_y_center_position():
    layout = Layout(width=1000, height=800)
    y = layout._get_team_set_score_y_center_position()
    assert y == 700
Beispiel #4
0
def test_get_x_position_home():
    layout = Layout(width=1600, height=800)
    text = Surface(100, 50)
    x = layout._get_x_position_home(text)
    assert x == (400 - 100 / 2)
Beispiel #5
0
def test_get_x_position_away():
    layout = Layout(width=1600, height=800)
    text = Surface(200, 50)
    x = layout._get_x_position_away(text)
    assert x == (1200 - 200 / 2)
Beispiel #6
0
def test_get_position_clock():
    layout = Layout(width=1600, height=800)
    text = Surface(100, 50)
    x, y = layout.get_position_clock(text)
    assert x == (1600 / 2 - 100 / 2)
    assert y == (2 * 800 / 8 - 50 / 2)
Beispiel #7
0
def test_get_x_center_position_away():
    layout = Layout(width=1600, height=800)
    x = layout._get_x_center_position_away()
    assert x == 1200
Beispiel #8
0
def test_get_y_center_position_title():
    layout = Layout(width=1600, height=800)
    x = layout._get_y_center_position_title()
    assert x == 40
Beispiel #9
0
def test_get_position_title():
    layout = Layout(width=1600, height=800)
    text = Surface(100, 50)
    x, y = layout.get_position_title(text)
    assert x == (1600 / 2 - 100 / 2)
    assert y == (800 / 20 - 50 / 2)
Beispiel #10
0
def test_get_position_team_set_score_home():
    layout = Layout(1000, 1000)
    text = Surface(100, 50)
    x, y = layout.get_position_team_set_score_home(text)
    assert x == (1000 / 4 - 100 / 2)
    assert y == (7 * 1000 / 8 - 50 / 2)
Beispiel #11
0
def test_get_position_team_score_away():
    layout = Layout(1000, 1000)
    text = Surface(100, 50)
    x, y = layout.get_position_team_score_away(text)
    assert x == (3 * 1000 / 4 - 100 / 2)
    assert y == (5 * 1000 / 8 - 50 / 2)
Beispiel #12
0
def test_get_y_position_team_name_home():
    layout = Layout(1000, 1000)
    text = Surface(100, 50)
    x, y = layout.get_position_team_name_home(text)
    assert y == (3.5 * 1000 / 8 - 50 / 2)
Beispiel #13
0
def test_get_x_position_team_name_home():
    layout = Layout(1000, 1000)
    text = Surface(100, 50)
    x, y = layout.get_position_team_name_home(text)
    assert x == (1000 / 4 - 100 / 2)
Beispiel #14
0
def test_get_y_position_team_name_away():
    layout = Layout(1000, 800)
    text = Surface(100, 50)
    x, y = layout.get_position_team_name_away(text)
    expected = 3.5 * 800 / 8 - 50 / 2
    assert y == expected
Beispiel #15
0
def test_get_team_set_score_y_position():
    layout = Layout(width=1000, height=800)
    text = Surface(100, 40)
    y = layout._get_team_set_score_y_position(text)
    assert y == (700 - 40 / 2)
Beispiel #16
0
def test_get_team_logo_y_position():
    layout = Layout(width=1000, height=800)
    logo = Surface(200, 100)
    y = layout._get_team_logo_y_position(logo)
    assert y == (200 - 100 / 2)