diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-09 20:52:42 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-09 20:52:42 +0100 |
| commit | 82622100135bc7a53b632603fb7f398a49637a69 (patch) | |
| tree | 069e47c6fb7be290d893e2602d40def2b2ea5b3e /tests | |
| parent | ae94e849a03122d8a4a2356e375cec9804b3e91a (diff) | |
| download | deck-it-82622100135bc7a53b632603fb7f398a49637a69.tar.gz deck-it-82622100135bc7a53b632603fb7f398a49637a69.zip | |
feat: auto-below placement re-reads the live layout
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_display.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_display.py b/tests/test_display.py index b69759a..7f90fe4 100644 --- a/tests/test_display.py +++ b/tests/test_display.py @@ -22,6 +22,16 @@ class Resolution(unittest.TestCase): "2560x1600") +class Below(unittest.TestCase): + def test_centered_under_the_reference(self): + ref = {"x": 0, "y": 0, "width": 2560, "height": 1080} + self.assertEqual(display.below_position(ref, "1280x800"), "640x1080") + + def test_honours_the_reference_offset(self): + ref = {"x": 0, "y": -540, "width": 2560, "height": 1080} + self.assertEqual(display.below_position(ref, "1280x800"), "640x540") + + class Swaybg(unittest.TestCase): def test_finds_the_image_for_an_output(self): root = Path(tempfile.mkdtemp()) |
