mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
geometry tests
This commit is contained in:
@@ -251,6 +251,10 @@ def test_region_y_range():
|
||||
assert Region(5, 10, 20, 30).y_range == range(10, 40)
|
||||
|
||||
|
||||
def test_region_reset_origin():
|
||||
assert Region(5, 10, 20, 30).reset_origin == Region(0, 0, 20, 30)
|
||||
|
||||
|
||||
def test_region_expand():
|
||||
assert Region(50, 10, 10, 5).expand((2, 3)) == Region(48, 7, 14, 11)
|
||||
|
||||
@@ -280,6 +284,10 @@ def test_spacing_bottom_right():
|
||||
assert Spacing(2, 3, 4, 5).bottom_right == (3, 4)
|
||||
|
||||
|
||||
def test_spacing_totals():
|
||||
assert Spacing(2, 3, 4, 5).totals == (8, 6)
|
||||
|
||||
|
||||
def test_spacing_css():
|
||||
assert Spacing(1, 1, 1, 1).css == "1"
|
||||
assert Spacing(1, 2, 1, 2).css == "1 2"
|
||||
|
||||
Reference in New Issue
Block a user