[pygobject] tests: Add tests for get/set_property()



commit c691d86c6f5f073f7c1e1e6ddd4311ed27431747
Author: Simon Feltman <sfeltman src gnome org>
Date:   Mon Jul 28 21:32:44 2014 -0700

    tests: Add tests for get/set_property()
    
    Re-use the new CPropertiesTestBase class for testing get/set_property()
    methods.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726999

 tests/test_properties.py |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_properties.py b/tests/test_properties.py
index b6c3783..d044dfe 100644
--- a/tests/test_properties.py
+++ b/tests/test_properties.py
@@ -1175,5 +1175,37 @@ class TestCPropsAccessor(CPropertiesTestBase, unittest.TestCase):
         self.assertTrue('maximum' in attrs)
 
 
+class TestCGetPropertyMethod(CPropertiesTestBase, unittest.TestCase):
+    # C property tests using the "props" accessor.
+    def get_prop(self, obj, name):
+        return obj.get_property(name)
+
+    def set_prop(self, obj, name, value):
+        obj.set_property(name, value)
+
+    @unittest.expectedFailure  # https://bugzilla.gnome.org/show_bug.cgi?id=733893
+    def test_boxed_glist(self):
+        # get_property() returns None or a GIMarshallingTestsBoxedGList
+        CPropertiesTestBase.test_boxed_glist(self)
+
+    @unittest.expectedFailure  # https://bugzilla.gnome.org/show_bug.cgi?id=733893
+    def test_char(self):
+        # get_property() returns a single element string which cannot represent
+        # tested values for G_TYPE_CHAR
+        CPropertiesTestBase.test_char(self)
+
+    @unittest.expectedFailure  # https://bugzilla.gnome.org/show_bug.cgi?id=733893
+    def test_uchar(self):
+        # get_property() returns a single element string which cannot represent
+        # tested values for G_TYPE_UCHAR
+        CPropertiesTestBase.test_uchar(self)
+
+    @unittest.expectedFailure  # https://bugzilla.gnome.org/show_bug.cgi?id=733893
+    def test_setting_several_properties(self):
+        # get_property() returns a single element string which cannot represent
+        # tested values for G_TYPE_UCHAR
+        CPropertiesTestBase.test_setting_several_properties(self)
+
+
 if __name__ == '__main__':
     unittest.main()


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