28 lines
917 B
Python
28 lines
917 B
Python
from pathlib import Path
|
|
|
|
from led_platform.services.tile_store import TileStore
|
|
|
|
|
|
def test_tiles_cover_wall_as_two_half_width_servers():
|
|
store = TileStore(Path("config/tiles.json"), wall_width=14880, wall_height=3510)
|
|
left = store.get("left")
|
|
right = store.get("right")
|
|
|
|
assert left.x == 0
|
|
assert left.width == 7440
|
|
assert right.x == 7440
|
|
assert right.width == 7440
|
|
assert left.right == right.x
|
|
assert right.right == 14880
|
|
|
|
|
|
def test_each_server_has_four_4k_physical_outputs():
|
|
store = TileStore(Path("config/tiles.json"), wall_width=14880, wall_height=3510)
|
|
|
|
for tile in store.all():
|
|
assert tile.desktop_width == 7680
|
|
assert tile.desktop_height == 4320
|
|
assert len(tile.physical_outputs) == 4
|
|
assert all(output.width == 3840 for output in tile.physical_outputs)
|
|
assert all(output.height == 2160 for output in tile.physical_outputs)
|