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




commit 362bd34474969691f09da18a84d57a95b29a5852
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 ec737fed..9699cc7e 100644
--- a/tests/test_gtk_template.py
+++ b/tests/test_gtk_template.py
@@ -537,7 +537,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>
@@ -551,7 +551,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()
 
@@ -562,7 +562,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>
@@ -585,7 +585,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]