mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
test
This commit is contained in:
@@ -195,6 +195,10 @@ def test_crop_size():
|
||||
assert Region(10, 20, 100, 200).crop_size((500, 40)) == Region(10, 20, 100, 40)
|
||||
|
||||
|
||||
def test_clip_size():
|
||||
assert Region(10, 10, 100, 80).clip_size((50, 100)) == Region(10, 10, 50, 80)
|
||||
|
||||
|
||||
def test_region_overlaps():
|
||||
assert Region(10, 10, 30, 20).overlaps(Region(0, 0, 20, 20))
|
||||
assert not Region(10, 10, 5, 5).overlaps(Region(15, 15, 20, 20))
|
||||
|
||||
Reference in New Issue
Block a user