[pygobject/wip/jfelder/template-gtk4: 2/5] tests: Do not use the margin property for template tests



commit d13351d948439fc59b76ee826426eb88272b84f7
Author: Jean Felder <jfelder src gnome org>
Date:   Mon Apr 27 21:36:26 2020 +0200

    tests: Do not use the margin property for template tests
    
    In GTK4, the margin property does not exist anymore. Replace it by the
    margin-top property.

 tests/test_gtk_template.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/test_gtk_template.py b/tests/test_gtk_template.py
index febdf705..0ba39f96 100644
--- a/tests/test_gtk_template.py
+++ b/tests/test_gtk_template.py
@@ -534,7 +534,7 @@ def test_internal_child():
       <template class="{0}" parent="GtkBox">
         <child>
           <object class="GtkBox" id="somechild">
-            <property name="margin">42</property>
+            <property name="margin-top">42</property>
           </object>
         </child>
       </template>
@@ -548,7 +548,7 @@ def test_internal_child():
         somechild = Gtk.Template.Child(internal=True)
 
     thing = MainThing()
-    assert thing.somechild.props.margin == 42
+    assert thing.somechild.props.margin_top == 42
 
     other_type_name = new_gtype_name()
 
@@ -559,7 +559,7 @@ def test_internal_child():
           <object class="{1}">
             <child internal-child="somechild">
               <object class="GtkBox">
-                <property name="margin">24</property>
+                <property name="margin-top">24</property>
                 <child>
                   <object class="GtkLabel">
                     <property name="label">foo</property>
@@ -582,7 +582,7 @@ def test_internal_child():
     assert isinstance(child, MainThing)
     child = child.get_children()[0]
     assert isinstance(child, Gtk.Box)
-    assert child.props.margin == 24
+    assert child.props.margin_top == 24
     child = child.get_children()[0]
     assert isinstance(child, Gtk.Label)
     assert child.props.label == "foo"


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]