@@ -81,14 +81,24 @@ def test_grow_child_half(window):
8181 assert dummy .rect == (100 , 100 , 200 , 200 )
8282
8383
84- def test_grow_child_full (window ):
84+ def test_grow_child_full_width (window ):
8585 subject = UIAnchorLayout (width = 400 , height = 400 )
86- dummy = subject .add (UIDummy (width = 100 , height = 100 , size_hint = (1 , 1 )))
86+ dummy = subject .add (UIDummy (width = 100 , height = 100 , size_hint = (1 , 0.5 )))
8787
8888 subject ._do_layout ()
8989
9090 assert subject .rect == (0 , 0 , 400 , 400 )
91- assert dummy .rect == (0 , 0 , 400 , 400 )
91+ assert dummy .rect == (0 , 100 , 400 , 200 )
92+
93+
94+ def test_grow_child_full_height (window ):
95+ subject = UIAnchorLayout (width = 400 , height = 400 )
96+ dummy = subject .add (UIDummy (width = 100 , height = 100 , size_hint = (0.5 , 1 )))
97+
98+ subject ._do_layout ()
99+
100+ assert subject .rect == (0 , 0 , 400 , 400 )
101+ assert dummy .rect == (100 , 0 , 200 , 400 )
92102
93103
94104def test_grow_child_to_max_size (window ):
@@ -101,7 +111,7 @@ def test_grow_child_to_max_size(window):
101111 assert dummy .size == (200 , 150 )
102112
103113
104- def test_shring_child_to_min_size (window ):
114+ def test_shrink_child_to_min_size (window ):
105115 subject = UIAnchorLayout (width = 400 , height = 400 )
106116 dummy = subject .add (UIDummy (width = 100 , height = 100 , size_hint = (0.1 , 0.1 ), size_hint_min = (200 , 150 )))
107117
0 commit comments