[pygobject] tests: Add failing test for marshalling an array of GValues through signals



commit dcf9111a86e01d66943909a0c9f21a181ccc38a6
Author: Martin Pitt <martinpitt gnome org>
Date:   Fri Aug 8 01:55:21 2014 -0700

    tests: Add failing test for marshalling an array of GValues through signals
    
    https://bugzilla.gnome.org/show_bug.cgi?id=669496

 tests/test_signal.py |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_signal.py b/tests/test_signal.py
index 20cb4ed..ac4c0a2 100644
--- a/tests/test_signal.py
+++ b/tests/test_signal.py
@@ -1106,6 +1106,18 @@ class TestIntrospectedSignals(unittest.TestCase):
         self.assertEqual(type(rv), GLib.Array)
         self.assertEqual(rv.len, 2)
 
+    @unittest.skip  # https://bugzilla.gnome.org/show_bug.cgi?id=669496
+    def test_array_parm(self):
+        obj = Regress.TestObj()
+
+        def callback(obj, arr):
+            obj.callback_arr = arr
+
+        obj.connect('sig-with-array-prop', callback)
+        obj.callback_arr = None
+        self.assertEqual(obj.emit('sig-with-array-prop', [1, 2, GObject.G_MAXUINT]), None)
+        self.assertEqual(obj.callback_arr, [1, 2, GObject.G_MAXUINT])
+
 
 if __name__ == '__main__':
     unittest.main()


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